add missing includes to common.h
dispatch_request belongs to daemon, move it there
factor out xmlrpc rpc related functions
Merge branch 'next' into rpccleanup
include config.h first
Merge pull request #166 from arnd/rpccleanup

Rpccleanup