tests: Added test_unit_formatter.py
lib.formatter.units: Fixed _format() for ndigits=0

"not ndigits" for ndigits=0 is also be evaluated as true and the setting
wouldn't have been taken into account.
lib.formatter.units: Simplified unit definitions

Merged common code
lib.formatter.units: Used namedtuple for clarity
lib.formatter.units: Added DEFAULT_*_UNIT constants
lib.formatter.units: Converted constants to uppercase
lib.formatter.units: Explicitly convert value to float

Needed for some uses of the Decimal column type
Merge pull request #91 from Turbo87/units

Units testing and simplification