Move varint, varstr parsing to BinaryParser for wider sharing of code.

Need it outside connection object, to permit reuse outside the scope of connections and networking.