Initialize Lazy Strings before passing to json.dumps

When trying to view the Repository Admin page, the master branch throws a
"Object is not serializable" error because the value getting passed is a
Promise (django.utils.functional.Promise) object rather than a decodable
string. Create a LazyEncoder that will check for this type and call force_text
on it so that it gets initialized properly. Reference:
https://docs.djangoproject.com/en/dev/topics/serialization/#id2

Testing Done:
WebUI - Ensured that the repository admin page works fine.

Reviewed at https://reviews.reviewboard.org/r/5038/
Bump to 0.7.26 dev.
Fix JSON validation to accomodate JSONField data that looks like a python literal.

Sometimes, our JSONField data will have embedded unicode markers for keys,
which isn't part of JSON but sometimes happens with python's json
serialization. We handle this in the field by using literal_eval on the data,
but the validator for form fields wasn't doing the same. I've extracted this
functionality into a method and used it for both the database field and the
validator.

Testing done:
Hit "save" on the reviewboard repository admin form when the extra_data field
had unicode markers for keys in the dictionary. Saw that it validated properly.

Fixes bugs 3143 and 3147.

Reviewed at https://reviews.reviewboard.org/r/5070/
Merge branch 'release-0.7.x'
Fix up a missing import.

'settings' was used in the new json validation code but not imported. Trivial
fix.
Revert "Fix JSON validation to accomodate JSONField data that looks like a python literal."

This reverts commit ef4893848d2f402660ba5e4419bc2ff0743a5caa.

That change broke Python 2.4 and 2.5 support (due to the
"except Exception as e" syntax), and also broke JSON validation in the
admin UI (causing badly formatted JSON to result in wiping out the
entire payload).

An upcoming change fixes this in a better way.
Properly represent JSON data in text fields in the admin UI.

Our JSON support has historically had some issues in the admin UI,
though we broke it a bit further in a recent release. This change
finally makes it work the way we always dreamed it would.

JSON data is now properly shown as-is, not as a Python repr() of the
structure, complete with validation. What's saved becomes valid JSON in
the model.

To make this work, JSONField now uses a custom form field
(JSONFormField) to do the conversion at the appropriate time from the
Python data to the serialized JSON. This will automatically be used in
every part of the admin UI and in every form that uses a JSONField.
Merge branch 'release-0.7.x'