HHH-7781 - SQL Server pagination with CAST operator

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