Escape control chars when serializing string keys and values to JSON

 * Add tests for escaping of regular ASCII chars, whitespace,
   non-ASCII unicode characters and control characters.

 * Escape characters in U+0000..U+001F as per RFC 4627 Section 2.5

 * Optimize sanitizeString() - return a QByteArray directly and
   pre-allocate the minimum amount of space that will be required.

MD-20993

Fixes #70
Fix Visual Studio build

Use Qt's qsnprintf() wrapper around snprintf() which is missing
in VS 2010.
Merge pull request #71 from robertknight/MD-20993-rob-json_escape_control_chars

Escape control chars when serializing string keys and values to JSON