core: Removal of DNS root from host name

This fix removes the DNS root name from the host name.
The DNS root name appears as "." at the end of the host name.
This patch also address the kerberos error when adding a
second domain.

Change-Id: I14ffafec4853f23a3bfa50793febafbbf97321f2
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>
Signed-off-by: Ravi Nori <rnori@redhat.com>