hooks: restore Internet Explorer 11 compatibility.
hooks: restore Internet Explorer 11 compatibility.

Compatibility with IE11 regressed in 23eab79946e4 while working for #3488.
That commit made use of modern js syntax, not supported by IE11.

- Removed arrow functions, replaced with normal functions.
- Removed the spread operator (<...iterable>) and the "new Set()" construct,
  replaced with _.uniq()

At some point IE11 compatibility will be dropped.
Ditching it now, for such a small gain, is not wise.

Fixes #3500.

storytouch/etherpad-lite,ether/etherpad-lite,ether/etherpad-lite,joequant/etherpad-lite,joequant/etherpad-lite,cloudfoundry-community/etherpad-lite-cf,ether/etherpad-lite,cloudfoundry-community/etherpad-lite-cf,storytouch/etherpad-lite,joequant/etherpad-lite,aptivate/etherpad-lite,cloudfoundry-community/etherpad-lite-cf,aptivate/etherpad-lite,cloudfoundry-community/etherpad-lite-cf,aptivate/etherpad-lite,aptivate/etherpad-lite,storytouch/etherpad-lite,joequant/etherpad-lite