Fix several interface & safety issues
- Missing std::error_code& arg on some functions
- Don't assert on internal handle (db*, coll*, etc.) fail gracefully
- Add some query operator overload declarations
- Use vectors over deques
- Fix tests accordingly