properly detect localhost

a blank hostname means localhost

Good news: we have already fixed that in most places.

This is blocking upgrading the appliance from the ui

 https://bugzilla.redhat.com/show_bug.cgi?id=1050211

/cc @brandondunne 
I like the look of `nil, "",`, but brandon's point here was that `blank?` actually handles spaces and other stuff like that.

I'll remove the 0.0.0.0. not sure why some places in the code do that.

This is not a random refactor. There is an actual bug that we need to backport.