Long stigmatized and banned by many towns and cities, factory-built housing is being reconsidered in some places because of soaring home prices.