CA-103189: Refactor host-apply-edition

host-apply-edition sets the specified license server address and port in
the host's license_server field, and rolls these back to the original
value if the server is out of license or unreachable.

This patch extracts the rollback logic out of the main implementation so
it can be used by pool-apply-edition.

Signed-off-by: John Else <john.else@citrix.com>