Fix the anonymous data dump for rails 5
Fix the anonymous data dump for rails 5

Silenced deprecation warnings and fix the TypeError
for array types.

Arel changes impact the #to_sql method call
on InsertManager objects.

This is more of a patch than anything else
as it will have to be changed again for
further rails/arel updates.

see below for fix inspiration:
  https://github.com/rails/arel/commit/6160bfbda1d1781c3b08a33ec4955f170e95be11
  https://github.com/IFTTT/polo/commit/8fba3068ab406c95dd395469b30cebf80d4e978e

ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments