RegisterFailedException can be handled differently from other exceptions.

Modified the necessary classes to allow the client to handle RegisterFailedException
differently.

* RegisterFailedException extends Exception instead of RuntimeException and implements
  Serializable. This is required for the exception to be sent over RPC.