Use config structs to build Server and Peer Server

The factory functions server.New and server.NewPeerServer are getting out of control. We can simplify them by using a config struct to encapsulate the user-provided data.