Implement a DeepCopy() method for rapidjson::Document

This can be used to copy entire documents or arbitrary Value subtrees from
one document to another. There's no refcounting going on, so we have to
copy the whole tree. Strings are copied by default, but they can optionally
be referenced instead.