Measures to let police, family members ask a judge to block someone’s access to firearms have been proposed in 18 other states.