incCapacity takes # of bytes required, not the delta
Rename incCapacity to ensureCapacity & minor code cleanup
Add test for ensureCapacity
Merge pull request #275 from duongnt/master

incCapacity takes # of bytes required, not the delta