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

yes :) But I didn't want to go down that rabbit hole at the time.