implement server identity in me response

Implement sufficient logic for server to identify its own address and name for me response.
split server into separate library

The server program now serves as an example.