Use lazy objects for variables in .settings

This avoids errors caused by stale setting values when testing with
django.test.utils.override_settings.
Fix up outdated test_js_var_name_changed_valid() test

The test checks for exports.Foo... when it should be this.Foo...
Recursively handle namespaced URLs
Update unit tests to test namespaced URLconfs