Implemented PHP-955: Switch the default mongo.native_long to 1 for 64bit platforms.
Merged pull request #568
Fixed prototype.
Added a test case for negative numbers (failure).
Merged pull request #580
Fixed PHP-949: ensureIndex() creates wrong names

Technically, the only valid index orderings are numeric negative and positive 1 (int or float) or strings (for index plugins). The server happens to accept other orderings and will create names based on those orderings, which is arguably a bug.

Looking at BSONObj::woCompare() in the server source, ascending/descending is decided by whether or not the numeric ordering is zero. We'll utilize that logic to decide how to name the index (appending "-1" or "1" after the field name).

This also fixes an issue with to_index_string() altering its zval argument (covered in bug00949-003.phpt).
Merge pull request #577