Fix for #1113
Merge pull request #1131 from rgasch/dbutil

Fix for #1113
flush cache for manual SQL statements
Merge pull request #1132 from rgasch/dbutil

flush cache for manual SQL statements
More flexible handling of $doJoin parameter for getCount()
Merge pull request #1133 from rgasch/dbutil

More flexible handling of $doJoin parameter for getCount()