John F. Kelly suggested that there were serious shortcomings with the system for vetting officials with access to the country’s most closely guarded secrets.