[web] refactor modal API to return modal key
Summary: In policy acknowledging logic we need to track whether modal is visible or not. As suggested in https://phab.comm.dev/D5830#inline-39308 we want to avoid duplicated state and what is more important have single source of truth. We need to have the modal key and then we will be able to check if given modal is present in modals array or no.
Test Plan: This code does not affect logic, but worth checking if modals on website works properly
Reviewers: tomek
Reviewed By: tomek
Subscribers: ashoat, atul
Differential Revision: https://phab.comm.dev/D5860