PHP-1136: Allow custom cursor classes from command/query results

https://jira.mongodb.org/browse/PHP-1136

This commit also restructures the namespaces and some write method APIs.