tor-socksproto: Implement HasKind
(This error isn't yet wrapped in TorError, but it will be eventually when we implement socks proxy and PT support.)
There is a major point of uncertainty in this branch about how to handle the "Truncated" error. Please review the commits one at a time, or you'll miss the discussion of alternatives. I am not sure we should actually merge the second commit here, but we do need some kind of a solution for the issue.
Edited by Nick Mathewson