[web] Handle unsaved changes with the UnsavedChangesModal
Summary:
If there are any changes in the create role screen, we want to push the UnsavedChangesModal if a user tries to click "Back" or the X button on the Modal. I had to check elements individually for the rolePermissions / pendingRolePermissions array since after selecting a permission and then deselecting it, simply using a === would no longer work on the two arrays since they would not be of the same reference.
Depends on D8595
Test Plan:
Tested the modal to confirm that the UnsavedChangesModal appears when it should
Reviewers: atul, ginsu
Reviewed By: atul
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8596