Fixes, especially to the handling of nedb's storing of reference fields. Also, added a remove that takes a query.