A man who was arrested following an armed security breach at Windsor Castle on Christmas Day has been detained under the Mental Health Act.