This fixes issue #569

To fix the encoding issue, I moved the encoding attribute from Player to Session, added an `@encoding` command for unconnected-in state, and moved the process of to_str() from amp.py to serversession.py.