Guard against overflow when peeking at PDU size

This is a partial cherry-pick from my commit to the Facebook Watchman
project[0].

I noticed while reviewing the corresponding pull request[1] that a
malformed header could cause us to index beyond the range of the `sizes`
array, so this commit pulls in the equivalent guard.

Note there is a bunch of other stuff in that pull-request and that
specific commit which I am not pulling down here. That code is in a gem
and so needs to be more defensive; in Command-T itself, if something
goes wrong with Watchman we want to fail noisily and loudly. So we're
not going to worry about freeing memory before throwing an exception
(effectively crashing) nor do we care about restoring the flags to their
pre-`fcntl` state (as we're the only users of the socket).

[0]: https://github.com/facebook/watchman/commit/5b0aa521ae
[1]: https://github.com/facebook/watchman/pull/37
[2]: https://github.com/facebook/watchman/pull/37#discussion_r12498885

Signed-off-by: Greg Hurrell <greg@hurrell.net>