Refactored the units of measure logic.
Moved it out of MainActivity into UnitsOfMeasure in preparation for
reuse by ForecastActivity.