High court allows ban on gays in military to remain, for now