10,000 gun licence holders have convictions for violence or sexual offending