[feature] JS modules

Includes https://github.com/CenterForOpenScience/osf/pull/1215 (which includes the original proposal) and
@samanehsan's additions in #1300