Governor Charlie Baker on Friday signed first-of-its-kind legislation to tax and regulate the short-term housing rental market in Massachusetts, capping years of debate over how to navigate an industry that has exploded through companies like Airbnb.