Move some common code out of the cogserver.
Lessen dependence on the CogServer
Merge pull request #662 from linas/deserv

move some common code out of the cogserver