Add non-throwing alternative to decodeVarint
Summary:
In mcrouter code, we would like a non-throwing alternative to `decodeVarint()`. There
are real, expected scenarios where only part of a serialized varint fits into a packet,
in which case mcrouter fails to decode the varint and throws. In these scenarios,
throwing too many exceptions can lead to lock contention and degrade performance.
Reviewed By: yfeldblum
Differential Revision:
D5153823
fbshipit-source-id:
138273af832903f0b04bee0bcacddd66b4274129