http: default Agent.getName to 'localhost'
This PR will:
- Refactor out the
if/else
conditional checking foroption.host
. If it exists,name
will be initialized with it. If not, default to 'localhost'. - Add whitespace to make concatenation chunks more readable and consistent with the https version of Agent.getName.