Fixes unit testing on Visual Studio.

tmpnam() in VS prepends backslash in the path.
GenericValue: avoid memset/memcpy(this,...)

To avoid writing outside of the current GenericValue object and to
follow the C++ standard more closely, this patch drops the
memset/memcpy(this,...) occurences in GenericValue in favour of explicit
initialisations/assignments of the data_ and flag_ members.

https://code.google.com/p/rapidjson/issues/detail?id=11
https://github.com/pah/rapidjson/commit/7475a969
Fixed out of bound read in FindMember() and added related new APIs

The original FindMember() may access out-of-bound of the 'const char*
name' parameter.
This commit firstly follows
https://github.com/pah/rapidjson/commit/f86af8c232dc280ae510b119018d66ca08b82312

However, this must incur an StrLen() for name. A better API is by using
Value as the name, which provides the length of string internally. So a
set of new API are added:

operator[](const GenericValue& name)
FindMember(const GenericValue& name)
RemoveMember(const GenericValue& name)

During refactoring, it also adds an API:

RemoveMember(MemberIterator m)

which can be used for other purpose, such as removing a member while
iterating an object.

Fixes #7
Adds GenericDocument::ParseStream() overload to make SourceEncoding optional

https://github.com/pah/rapidjson/commit/77e5c6b1
Added a unit test for SkipWhitespace()
Fixed gcc 4.8.x warnings.
Revert "Adds GenericDocument::ParseStream() overload to make SourceEncoding optional"

This reverts commit 84f64ba58a73a0898ad78ea239323942b63c6d51.
Merge branch 'master' into dev
Revert "Merge branch 'master' into dev"

This reverts commit d4cb506d4b3c29dba1b4f27fa109b80b33bd6d1b, reversing
changes made to dfe201e3c1e9f184a3967719dbb0e59ef12ed54b.
Fixed some clang -Weverything warnings.
Separate the RAPIDJSON_FORCEINLINE from RAPIDJSON_NO_INT64DEFINE
Fixed VC which doesn't have INT64_C()/UINT64_C macros.
Use thirdparty stdint.h for Visual Studio
Merge remote-tracking branch 'origin/dev'
Merge branch 'master' of https://github.com/miloyip/rapidjson
Writer: add SetDoublePrecision to control number of significant digits

Writing a double to an OutputStream current prints at most 6 significant
digits (according to the C standard).

The function SetDoublePrecision(), added to the Writer classes
can be used to fluently set the precision, i.e. the number of
significant digits to use for writing the double:

  Writer<...> writer(...);
  d.Accept(writer.SetDoublePrecision(12));
Writer: add Double(d,precision) for one-shot double output

As proposed in other patches, it is convenient to pass a user-defined
precision for the (programmatic) output of a single double value
to an OutputStream.

This patch adds an additional overload with an explicit precision
argument to the (Pretty)Writer class templates.
DoublePrecision: add a unit test for the precision handling
GenericDocument::Accept: deep-copy strings, if needed

Instead of always just shallowly referencing the potentially allocated
strings when calling the Handler::String function, request a copy in
case the string has been allocated from an Allocator before.

This is necessary to avoid double free()s of the string memory,
especially when using the Handler to create a deep copy of a Value.

The explicit comparison against '0' is done to suppress the warning
C4800 on MSVC, see pah/rapidjson#5.
GenericValue: add copy constructor and CopyFrom

To allow deep copying from an existing GenericValue, an
explicit "copy constructor" (with required Allocator param)
and an "CopyFrom" assignment function are added.

  Document d; Document::AllocatorType& a = d.GetAllocator();
  Value v1("foo");
  // Value v2(v1); // not allowed

  Value v2(v1,a);                             // make a copy
  RAPIDJSON_ASSERT(v1.IsString());            // v1 untouched
  d.SetArray().PushBack(v1,a).PushBack(v2,a);
  RAPIDJSON_ASSERT(v1.Empty() && v2.Empty());

  v2.CopyFrom(d,a);                           // copy whole document
  RAPIDJSON_ASSERT(d.IsArray() && d.Size());  // d untouched
  v1.SetObject().AddMember( "array", v2, a );
  d.PushBack(v1,a);

Additionally, the Handler implementation in GenericDocument is made
private again, restricting access to GenericReader and GenericValue.