migrate helpers.py from apps/amo (bug 1074184)

I wouldn't use the template filter here if you're already in Python. Just do `jsonlib.dumps(...)`.