added convertToValue to resolve the right side of query expressions
added 'box' to util
convertToIdSet internally uses convertToValue
fixed test
QueryWriter draft implementation
QueryWriter.ready responds correctly to empty idSet and undefined criteria