Auto-format code using RubyCop 0.28.0

Command used: `rubocop --rails --auto-correct`

Also add some RuboCop configuration and manual corrections.
Batch trim trailing whitespace
Fix some errors and warnings

* uninitialized constant BusinessUnitsHelper (NameError)
* superclass mismatch for class Mysql2Adapter (TypeError)
* Passing a template handler in the template name is deprecated. ...
Fix failing spec

Error was

> ActiveRecord::DeleteRestrictionError:
>       Cannot delete record because of dependent purchases

Remove the block and depend in DatabaseCleaner to clean the database properly.
Kill off XML responses

We don't use these.