Leaders from the Marines, Navy, Air Force and Army testified during a hearing held by a House armed services subcommittee about each service’s social media policies and the training in place after reports that some Marines and sailors had participated in a Facebook site that distributed nude photos of women in the service.