Add Stack::ShrinkToFit() and some refactoring.

Lazy allocation. (so Document not for parsing don't need to allocate
stack).
Remove redundant stackCapacity member variable.
Change Reader/Writer's stack allocator to CrtAllocator
Add ShrinkToFit() to StringBuffer and MemoryBuffer
Separate Document's value and stack allocator.

Use CrtAllocator for stack.
ShrinkToFit stack after parsing.
Fix a gcc compilation error
Merge pull request #105 from miloyip/MemoryOptimization

Memory optimization