PHP-999 and PHP-1000: Fix RP support for mapReduce commands

The issues are separate but closely related:

 * https://jira.mongodb.org/browse/PHP-999
 * https://jira.mongodb.org/browse/PHP-1000