Fix #272: add 'allocate_ids' RPC to connection

Also reorders other RPC methods to match the order in the protobuf spec.