Move trigger_error functions from collection.c to php_mongo.c