relay: multiple refactoring

* remove dependency of Server on Connection
* cleanups and renames