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.
Probably just because it was late and I was tired. I was exploring if there was a way to do a conditional assignment based on whether the rvalue was set (or at least truthy), so I was playing around with a few different methods in `Hash`.

It turns out that there isn't an easier way to do it than this (or using `[]=`, obviously), and there's no magic operator like `||=` or `&&=` for this kind of assignment.