display a warning if any forms have been modified when closing modals

Summary:
refs T782

Works by storing the state of forms on open, then checking the states again on close.

This assumes that the modal will close by the included close function (within onShow), so if modals are closed by other methods it will have to be updated.

Also, this would still display the confirmation if a form was changed by some other JS, and not by user actions. Are there any modals that do this?

Test Plan: Try opening and closing various modals with and without modifying form values before closing.

Reviewers: rjmackay, shadowhand

Reviewed By: shadowhand

Maniphest Tasks: T782

Differential Revision: https://phabricator.ushahidi.com/D362