Feature/jquery rewrite

This solves some of the problems described here: https://www.openproject.org/work_packages/1501.

This should be reviewed along with https://github.com/finnlabs/openproject-impermanent_memberships/pull/13.