Initial refactoring of query to adopt new syntax

- JSON char is now : instead of ?
- pass all test cases
- add check_key and check_value
- arrays use SDB_RS ',' now
- support atomic queries
- add more test cases