Fixed PHP-774: Mark MongoCollection::toIndexString as deprecated.

For this to work, I also had to separate it out as otherwise our own
ensureIndex() would throw a deprecation warning.
Fixed NULL-dereference error and ZTS build.
Fixed tests for PHP 5.2.
Fixed another NULL-dereference

And adding missing tests for deleteIndex/deleteIndexes so that we can see that
this failed. However, I noticed a really annoying behaviour for deleteIndex(
string ). Instead of it dropping an index with the name "string", it uses it as
a field name to append "_1" too. So you can not use it at all for user-named
indexes. I've added issue PHP-817 to the 2.x milestone to sort that out.
Merged pull request #434