Getters and setters.

Getters and setters for hostname, port and scheme. Also better
destructor.