Fixed #23788 -- Used new JavaScript support in recent gettext

JavaScript string extraction support has been added in gettext
0.18.3.
Thanks Aymeric Augustin for the review.
Removed import forgotten in previous commit.
Normalized opening a file and decoding its content.

`io.open` is required on Python 2.7. Just `open` would work on Python 3.
Cleaned up the django.template namespace.

Since this module is going to hold both the implementation of the Django
Template Language and the infrastructure for Multiple Template Engines,
it should be untied from the DTL as much as possible within our
backwards-compatibility policy.

Only public APIs (i.e. APIs mentioned in the documentation) were left.
Refactored listing template subdirectories in apps.

This change has the nice side effect of removing code that ran at import
time and depended on the app registry at module level -- a notorious
cause of AppRegistryNotReady exceptions.
Imported BaseEngine from the DEP.

i18n is left aside for now.
Added initial support for loading template engines.
Added dummy template backend.