Corrected mysql queries for case-sensitive mysql databases.
(cherry-picked from ac589b5)
BZ 1024233: corrected 'total process instances' count in jbpm dashboard
(cherry-picked from 131c247)