added `type` option for `GET /_api/document?collection=...`
removed hard-coded value
take compatibility settings into account even for async requests
speed up cursor access