This patch adds a hidden pref 'privacy.resistFingerprinting.block_mozAddonManager',
which is false by default. When this is true, the navigator.mozAddonManager will
be blocked even the website is AMO.
The purpose of this pref is for Tor browser can disable navigator.mozAddonManager
through this.
MozReview-Commit-ID: Lf37gHXETCz
Since we want to add a few APIs that AMO can use to query and manipulate the
user's add-ons we want to expose a custom API. This implements the webidl and
a stub implementation in JavaScript. We use the webidl functions for controlling
access to the API, only the AMO production domains (and some test domains when
testing is enabled) can access it and only when retrieved securely and not in
an inner frame of a page that shouldn't have the API.
MozReview-Commit-ID: 3HUUrduuHwf