A day after a gunman massacred parishioners in a small Texas church, the Air Force admitted on Monday that it had failed to enter the man’s domestic violence court-martial into a federal database that could have blocked him from buying the rifle he used to kill 26 people.