Fixed PHP-1227: Declare support for MongoDB 2.8 Wire Version (3)
Merge Pull Request #750

* PHP-181-wireversion:
  Fixed PHP-1227: Declare support for MongoDB 2.8 Wire Version (3)
PHP-1160: Support MongoCollection::count() $options array

Scalar limit/skip option arguments are still supported, but $options array will allow "hint" option to be specified.

Require an array or object for MongoCollection::count() $query arg. Previously, an invalid type for this argument was ignored and passed through to the server (where it was likely ignored). The lack of validation may have been an oversight, or done purposely so that null could be specified as a convenience if the user only wanted to provide limit/skip scalar arguments.
Test MongoCursor::count() $foundOnly with limit/skip options
PHP-1160: Ensure MongoCursor hint is passed to count command
PHP-1160: Omit empty query hashes from count commands

When calling MongoCollection::count() with an empty $query argument, an empty array would be serialized as a BSON array and trigger a validation error on MongoDB 2.7.7. If the $query argument is an empty hash, simply omit it from the command.

This is generally not a problem for MongoCursor::count(), since its constructor detects an empty query argument; however, it could still happen if the query is modified after the fact.

Note: SERVER-15456 relaxed validation of the query option in 2.7.8, but it shouldn't hurt to have these precautions in the driver.
PHP-1160: Update MongoCollection::count() arginfo
Merge pull request #744
PHP-1251: MongoCursor::count() should use cursor's maxTimeMS
Merge pull request #748
Remove redundant require_once statements from SKIPIF blocks
Merge pull request #752
PHP-1263: Throw timeout exception for MongoCollection::count() maxTimeMS timeout

Previously, the count() helper threw its own exceptions instead of utilizing php_mongo_trigger_error_on_command_failure(). With this change, MongoExecutionTimeoutException will now be thrown for a maxTimeMS timeout and other exceptions will be handled consistently with other command helpers that use the utility function.

count() may still throw its own exception, but only if the "n" field is not found in the response, which should never happen in practice. To be consistent with other command helpers, it now throws a MongoResultException for that error (not a BC break since it sub-classes MongoException).
Merge pull request #753
PHP-1264: Rename php_mongo_write_item fields

Making the field names a bit more descriptive avoids use of "delete", which is a reserved word in C++.
Merge pull request #754
Merge branch 'v1.5'
PHP-977: Regression test for cursor iteration within generator
Merge pull request #755
PHP-1265: More descriptive errors for invalid db/collection names