[MessageHandler] Remove unnecessary usage of `in` from the code
[MessageHandler] Remove unnecessary usage of `in` from the code

Note that using `in` leads to unnecessary stringification of the properties, which seems completely unnecessary here. To avoid future problems from these changes the `MessageHandler.on` method will now assert, in non-`PRODUCTION`/`TESTING` builds, that it's always called with a function as expected.

This patch also renames `callbacksCapabilities` to `callbackCapabilities`, note the removed "s", since using a double plural format looks a bit strange.

nawawi/pdf.js,mozilla/pdf.js,macroplant/pdf.js,xavier114fch/pdf.js,mozilla/pdf.js,macroplant/pdf.js,timvandermeij/pdf.js,timvandermeij/pdf.js,Snuffleupagus/pdf.js,Shoobx/pdf.js,Shoobx/pdf.js,nawawi/pdf.js,xavier114fch/pdf.js,mozilla/pdf.js,showpad/mozilla-pdf.js,showpad/mozilla-pdf.js,Snuffleupagus/pdf.js,caremerge/pdf.js,Snuffleupagus/pdf.js,macroplant/pdf.js,showpad/mozilla-pdf.js,Shoobx/pdf.js,timvandermeij/pdf.js,nawawi/pdf.js,caremerge/pdf.js