Make string_to_num work with floats.

It basically amounts to a name change, because the functionality
was already there. There's also a new test for it.

Change-Id: I982ed9de87862bd65b29a81be858b45040bc9d45
3 files changed