This commit adds a rule registry as a central place to register new rules. It will expose a Description and a factory to create a rule object.
In BaseRule.baseUpdate our goal is to check if a hostname exists before trying to rename that hostname into something else. This patch fixes an error where the newly generated Hostname was used to check for the existence of the old hostname.