s3-dcerpc: Move common cli/srv functions into a common file