Units: speed improvement

By not re-decomposing units repeatedly, we get a 25% speedup in compose and decompose.

Not much controversial here -- mainly just submitting as a pull request to get Travis to give it a once over.