fixes #2980
Add SelectWithData widget
Add custom widget and supporting JS.
Widget now must be init'ed with dict containing default namespaces
Revert to original code
Construct namespaces dict and init widget with same
Clear out namespace on choosing an app that does not require one.
Remove reliance on django.utils.format_html which wasn't introduced until Django 1.5.
Make changes per @FinalAngel’s comments
fixes some circular imports
Merge pull request #2982 from digi604/fix-2980

fixes #2980 (undo placeholders mismatch)
Merge pull request #2989 from mkoistinen/smarter_app_hook_ui

Smarter app hook ui (related to issue #2612)