Fix format_number() to not go passed decimal point

If perfdata was like 0.010445s than format_number() would
change that to be 0.010,445s when displaying the human readable
format. Stole this thousands seperator from perl monks which was
contribued by Roger (http://www.perlmonks.org/?node_id=320265)
that seems to work well and fixes the issue of formatting past the
decimal point.
Merge pull request #303 from awiddersheim/fix_number_format

Fix format_number() to not go passed decimal point