Cleanup unit conversions

The original code was mostly borrowed from Sass' implementation of unit
conversion without giving it much thought. This patch vastly cleans up
the original implementation by using a single map.