server: move service table and factory from commandserver
This is necessary to solve future dependency cycle between commandserver.py
and chgserver.py.
'cmd' prefix is added to table and function names to avoid conflicts with
hgweb.
#require docutils gettext
$ $TESTDIR/check-gendoc el
checking for parse errors