Move string encoding to srpregister.
Handle Timeout errors during register.

Also catch all request exceptions to avoid failures.

[Closes #4358]
Merge remote-tracking branch 'ivan/bug/4358_unhandled-error-during-register' into develop