nedb: support array _id in query
implement model reference and make all tests pass