Add an RPC object and export it.

It exports essentially the same methods we have over HTTP, but named
appropriately and using protobufs.