Check that length is positive in TypeSerializer.Deserialize

Change-Id: Ic229fbdd0362593ac7577350cc04f549380ac7f5
Reviewed-on: http://review.couchbase.org/40714
Tested-by: Jeffry Morris <jeffrymorris@gmail.com>
Reviewed-by: Brett Lawson <brett19@gmail.com>