Fix overflow when encoding a dense NDV string

EncodeNdv() checks to see if writing a C,V pair will overflow the output
string. However, the output string was incorrectly initially sized two
bytes too small, which could lead to the encoder writing two bytes past
the end of the buffer before realising that the encoded string would be
too long and aborting.

Change-Id: Ic65610460ff82cc000a4a5356b1b06931deb1bc4
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/5436
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins