Improve code quality a bit

CodeClimate had some things to say about a couple of methods.

I added tests for them, and tried to fix some of the issues.

* The mailer (Notifier) now actually has tests.
* The mailer got a major refactoring.
* Purchase.payable_grouped_by_person now has tests, and is a bit less messy.
My guess is that it will likely be highly coupled to the copy even if we're checking for certain keywords.

Would it be possible to do these checks against `I18n`, to see whether it rendered some specific translation key instead? That way, we could also allow for emails to be sent out in english, which might be a good idea at a later point.

Maybe we could reformulate the subject lines a bit, and then match against them?