Dozens of pieces of gun-related legislation that advocates say will bolster public safety are winding their way through Virginia’s Democratic-controlled General Assembly, including a measure that would halt the sale of certain semiautomatic firearms.