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.
Hm... You're probably right. Since this is the first thing that happens, and only admins are able to create debts (debts aren't even used..., i think), it should probably be the same person.