NODE-306 (No results in aggregation cursor when collection name contains a dot), Merged code for cursor and aggregation cursor.