Legislation passed this week by Massachusetts lawmakers would extend state and local occupancy taxes to short-term rental properties.