Implement 'allocate_ids' RPC on Connection.

Fixes #272.