Fixes AR mysql2 adapter incorrectly casting boolean values

Using the mysql2 adapter, boolean values were being incorrectly cast to 't' or 'f'. This
changes the cast to match the mysql adapter behavior, ie 1 and 0.

Fixes #11119