api_v3: let document_new accept the renderer as first argument