The US National Rifle Association has filed for bankruptcy, a huge move for the gun-rights group that boasts about 5 million members.