Add RPC call for new-style registration.

The new RPC command 'name_register' performs new-style name
registration.  Also fix a problem with mining these.