The gunman who carried out the massacre of 26 people at a small-town Texas church briefly escaped from a mental health center in New Mexico in 2012 and got in trouble for bringing guns onto a military base and threatening his superiors there, police reports indicate.