HHH-4150 - Support for COUNT CASE in HQL query

Patch and test for HHH-4150 JIRA ticket.
Link: https://hibernate.onjira.com/browse/HHH-4150

Regards,
Lukasz Antoniak