(PDB-100) Convert terminus to internally use a URL connecting to PDB

There purely a refactor of terminus' HTTP code to use URLs rather than
the existing server + port combination internally. The user still
specifies server+port and we convert this internally to URLs. This is
step one in getting connection failover for the terminus.

This is my first significant change to the terminus code and would appreciate some feedback on the new API, style etc.
Is there a better way to get the current config than what I'm doing above?