Tiny homes — houses that generally measure under 500 square feet — have become increasingly popular in the face of rising real-estate costs.