packaging: setup: add getHostname

Move the code asking for the FQDN to a common place, to allow asking for
other host names.

Copy the FQDN to ENGINE_FQDN to be used by other plugins needing the
engine fqdn.

Change-Id: I8747002a14de6d96d5a7e185258d8ee0955b8a24
Related-To: https://bugzilla.redhat.com/1118330
Related-To: https://bugzilla.redhat.com/1080992
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
(cherry picked from commit 8b84424185bea6dd9f99940b9b4aa2637eb1504f)