A new homeowner holds a key. SmartAsset analyzed data on various metrics to determine the cheapest states to buy a home.