'Red flag' bill debated for hours in Maine months after mass shooting that killed 18