Allow cross-type conversions for numbers.

Latest versions of encoding/json implement a Number==string type which
will cause a fault during a copy of Number to a base type. This fix
checks the source type and converts it to destination appropriately.
Additionally, it supports cross base type conversions so not limited to
a source Float type from a normal json decode.