Add string::lexical_cast function and tests.
Refactor implementation of fprint.

As a result this also refactors print and sprint.
Rework handling of escaped characters for io::fprint and friends.
Add alignment specifier to io::fprint's and friends format string.
Add format specifiers to io::fprint's and friends format string.