filter.js: add support for static and dynamic queries as filters; use static filter for flow(); add tests into xs_core test suite