Unit fixes

Two fixes for the unit system. One of the fixes slightly changes the formatting of unit strings (e.g. it now will print `2. mV` instead of `2.0 mV`), including using a slightly different algorithm for choosing the "best unit" when printing arrays.