Implementation of rationalize()

rationalize transforms a float into a Ratio<BigInt>.
It's based on the Common Lisp implementation.