Unified the string formatting functions

This patch unifies some similar ```sprintf()``` like functions into a single function ```Utils::formatString()```.
This also adds a test for ```String::number()``` and underlying ```Utils::formatString()```.