US Army captain helps foil Denmark school attack plot