Moved code from Negotiate.h here, cleaned up a bit.
Moved code from Negotiate.h here, cleaned up a bit.

worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp