The war in Iran’s impact on the housing market is emerging as KB Home reports weaker demand, lower earnings and rising uncertainty.