Specify rails 4 so it does not include rails 4.1 in Gemfile_rails40.
Merge pull request #1117 from Shopify/fix_rails4_tests

Specify rails 4 so it does not include rails 4.1 in Gemfile_rails40.
Fix AVS/CVV response code handling
Relax matching; Update random