Mayor resigns over threats after mask mandate