User email observer (Code Climate improvements)

I'm opening this up for discussion.

You can see the rating [improvement from an F to an A](https://codeclimate.com/github/locks/discourse) (I had to put the commits on my master branch so CC would pick it up).

I still haven't squased the commits to make it easier to follow my train of thought.
I just got an email from Travis (godsend, it is) warning me I basically broke all UserEmailObserver tests. I wouldn't mind a code review while I fix the tests.

**Tasks**
- [x] Fix [failing tests](https://travis-ci.org/locks/discourse/builds/10222442)
- [x] Squash commits
- [x] Sign CLA