Corrected DML DDLRresult and added tests.

Need to think about introducing AST layer
Added new AST type builder which is cleaner and more flexible

- need to solve casting of results in this version though
removed old Query model in favor of newer AST based model
Fixed generic being lost. Not completely ideal solution. But new version
is ready to be merged back to master