shell: Allow dots in static hostname

Adds rule when changing host name to allow the user to be able to use
periods in between characters but not consecutive ones since empty
subdomains are invalid. Also changes the error message appropriately.

Fixes #1132
Reviewed-by: Stef Walter <stefw@redhat.com>
shell: Leave domain part of hostname intact

when computing the real name from the pretty name.

Reviewed-by: Stef Walter <stefw@redhat.com>
daemon: Also set the static hostname

Reviewed-by: Stef Walter <stefw@redhat.com>
daemon: Get the transient hostname from the kernel

since hostnamed doesn't send change notifications.

Fixes #1160
Reviewed-by: Stef Walter <stefw@redhat.com>
daemon: Allow setting of empty hostnames.

Since that makes sense.

Reviewed-by: Stef Walter <stefw@redhat.com>
shell: Don't default the pretty hostname to the real one

If it is empty, it should stay empty.

Reviewed-by: Stef Walter <stefw@redhat.com>