Fixed PHP-650: Segmentation fault when using findAndModify().

In some cases, where findAndModify() causes a cursor (or other timeout), the
returned document is NULL. Because we didn't check for this, a segfault
occured.

Writing a test case for this is tricky as we'd need to simulate a failure.