Move GLE "wnote" check out of MongoCursor::next()

This check belongs in php_mongo_trigger_error_on_gle() in collection.c. Additionally, we can avoid allocating a new string in the handle_error() function in cursor.c.