Warn user when leaving badge settings page and requests are still pending
When adding / saving / deleting a badge (https://gitlab.com/gitlab-org/gitlab-ce/issues/41174, https://gitlab.com/gitlab-org/gitlab-ce/issues/41176), the user should be warned when leaving the page before the action was successfully completed (https://gitlab.com/gitlab-org/gitlab-ce/issues/41174#note_61827720).
We probably want to add a handler for the [`beforeunload` event](https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload) to achieve this.
#### Design

#### Old Design

issue