daemon-rewrite/api: Implement XML-RPC server