Add type float

* Make common class Number for Int and Float.
* Fix code redundance.

Signed-off-by: Daniel Francis <francis@sugarlabs.org>