refactor server implementation

Make server a little less "magic state" and a little more explicit. Now
endpoints for depth and control are created but only the control
endpoint is advertised via zeroconf. Other endpoints should be obtained
via the control endpoint.

Also enable ``with``-statement support for servers to make their
lifetime a little more explicit.