I put the original escape back in but redirected the call to a new function
that will escape characters in the form of \xNN when:
`byte < 0x20 || byte >= 0x80`
This leaves slashes alone and should fix this issue.
UPDATE: Tests have also been added. Added an English test to test for NOP.
I believe the cause of the problem was that an extraneous escape was happening
in the `addNewResults` function in query.cpp.
I believe this can be safely removed because it's purpose is only to make things
JSON safe. However, I don't think this function is ever called with out a JSON
serialization later, making this unnecessary.
This is the issue noted in #76. Keeping all historical results of
queries in the HistoricalQueryResults struct makes serializing and
deserializing those structs very, very slow as time goes on. By only
storing the last execution of the query, we keep the performance
constant, but we kill the feature where osquery can rebuild timelines
without accessing logs. After talking it over, we decided that this
isn't actually that big of a deal because, if you really wanted to
rebuild the old data, you should be able to process the logs, similarly
to bin log replication in MySQL.