Improved dimensionality checking in UnitRegistry.convert

As dimensionality for source and destination units are computer before
converting values, this patch compares them before to fail early.
Get get_dimensionality should work even for compound non-multiplicative units
Reindented code
Added an optional argument to get_base_units to return the scaling factor even if nonmult units.

The optional parameter allows collecting the scaling factor even if a
non multiplicative unit is found on the way.

Fix #85