[httpproxy] Fix invalid memory write
[Problem] Invalid memory write when WriteValue follows offset of 10
and than update value from offset 6 with len of 2.
Consider first set char value is called by offset 10 and value length 2.
API Allocates memory of size (10+2) 12 bytes and when set char value is
called again with offset value of 6 and value length of 2.
API reallocates memory of size (6+2) 8 bytes. After allocating it
copies earlier 12 bytes but new allocated one is only of 8 bytes which
leads to memory corruption.
Measure: reallocate only when current value length can't hold requested
offset + value_length
Change-Id: I17eac3e5df5125894a0c74304e7328a85972c865