Implement cursor.toArray and cursor.stream to support API parity between MongoDB and NeDB.