fixed slow parsing of Iso8601 dates due to boost::lexical_cast
added jsonEncodeToStream() function for writing to an ostream