Bugfixes around utils.functional.allow_lazy

Includes fixes for the following tickets:
* https://code.djangoproject.com/ticket/20221
* https://code.djangoproject.com/ticket/20222
* https://code.djangoproject.com/ticket/20223
* https://code.djangoproject.com/ticket/20231

Here's the two main points that this PR change:
* Introduce `keep_lazy` as a replacement for `allow_lazy`, which allows it to be used with normal decorator syntax.
* Fix the issue of lazy strings not being marked safe by introducing a `safe` decorator that marks the output of functions as safe, and using that decorator on the lazy-enabled version of functions.