“Granny flats” in California and single-staircase codes in Texas: States are trying to fill a gap that has pushed homeownership out of reach for many.