PHP-1251: MongoCursor::count() should use cursor's maxTimeMS

https://jira.mongodb.org/browse/PHP-1251

Currently based on #744, since the change is closely tied to `MongoCursor::count()` modifications from that PR. Only the final commit is necessary to review here. This PR will be rebased once #744 is merged.