[Bug 850215] Safe email translation.

I made a decorator that calls a function, and catches any errors that
might be localization issues. If one of these types of exceptions is
raised, it logs the request and sets the locale to English and tries
again. Then I found all the places where @willkg's `uselocale` context
manager was being used and converted it to a function that used this
decorator. In my testing this makes emails robust to localization
errors.

I tried to make this a modification to the context manager originally,
but to run the wrapped code again would require ugly bad horrible
bytecode hacks. So I decided better not do that. Luckily, this was is
generic enough that it might be reusable for web traffic too. I didn't
look into this very much.

I tried to log these errors in a way that will make them easy to work
on. I am assuming that we have Sentry/Raven configured to automatically
add stack traces. If this assumption is wrong, we can add the stack
trace into the error message later. There is a test that verifies that
logging does indeed happen.

Fix tests, move inline functions out of loops.

Move things around, test logging.

* Move translation functions out of loops
* Move locale selection closer to where it gets used.
* Test that logging actually happens.