Across the country, people are moving in with strangers decades older than them, transforming spare bedrooms into a valuable commodity in a housing market that’s become impossible for many to afford.