This patch adds a new "integer" ValueType, and renames Number -> Double.
This allows us to preserve the full precision of int64_t when parsing integers
from the wire, or constructing from an integer.
The API is unchanged, other than giving asInteger() a clearer contract.
In addition, always output doubles with enough precision that parsing will
reconstruct the same double.
Tiniest nitpick ever: in this function you've explicitly said std::strtod, but used strtoll unqualified. I wasn't able to figure out which of <cstdlib> and <stdlib.h> actually ends up being included by the headers this file asks for, but std::strtoll would probably be safer, just in case it's <cstdlib>.