active_record: performance improvements

* Speed-up where queries by caching quoted values and by-passing Rails' sanitization stack
* Wrap response and transaction creation in a single transaction (speeds up the happy path)

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
active_record: performance improvements

Skip the validation stack as we don't use it.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
active_record: performance improvements

Construct the transaction association manually instead of using
ActiveRecord's magic.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
generators: update active_merchant templates

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
payment_plugin: fix save_response_and_transaction call

Make sure to pass the right response model.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
VERSION: bump to 3.1.6

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>