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 thought "0.0.0.0" was "any ip on this host".