National Defense Authorization Act kommer att förbjuda mobiltelefoner för elever i grund- och gymnasieklass som går i skolor på militärbaser.