HPCC-8909 - Avoid thor recycling if registration error detected

Serialize an error code to master and exit thor cleanly
on registration error to avoid scripts causing auto-recycle

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>