utility functions that don't belong to any particular class

Summary: Simple utility functions that are used by many views and don't belong to any particular model

Reviewers: alpert, joel

Reviewed By: alpert

CC: ben

Maniphest Tasks: T1210

Differential Revision: http://phabricator.khanacademy.org/D3009