Fix NPE in slave registration and make default slave name prefix match the dynaslave UDF

Testing on builds101:

1. Restart Jenkins with the new plugin, make sure existing slave registers and NPE is not thrown
2. Increase the jenkins_slave-upgradetest ASG size by 1 and make sure new instance registers with the master (this is where I had to change the default prefix).

Both tests passed.