Bug 839271: Use the inner window ID to cache workers so we get a new one if the outer window doesn't change.
(cherry picked from commit 15196a13eeb8f4c7096fa33b62dc98b27710bb95)
(cherry picked from commit 5bc5d859bd2b2986ceaefc0f5d70401cce3ba94d)
Bug 839271: Address review comments.
(cherry picked from commit f660caaf5759771189ee8787ec704e3766e3eff2)
(cherry picked from commit 9ff90a7f615769c1438b3dbbb0910c061519f346)
Bug 839321: If a context-menu module's items are all hidden then it may hide the items from other add-ons.
(cherry picked from commit 1e8f44e52bd4efce28e81a11f25cc39113698f8c)
(cherry picked from commit 1dd5ece52cee3185aafd863eeb5c79a2949de02c)
Bug 839318: context-menu should overflow based on the number of visible menu items.
(cherry picked from commit 83b1d8fc326829d71a23c06ed4e0a51b0c72502c)
(cherry picked from commit 056da994cc2802fdc2b23964e4080cb95bfecb1e)
Bug 839814: Returning undefined from a context listener should hide the menu item.
(cherry picked from commit 11b766d803947adbc36e460bab5758c00c22be37)
(cherry picked from commit 22cda4b088a46f086fdfd6d8cabbf7e30605b7f3)
Merge pull request #765 from ochameau/bug/833783

Fix Bug 833783: Fix leaks in tabs and windows when closing a top-level chrome window. r=@erikvold(cherry picked from commit b06eb5ba5d95fa7c2ccfb916ed7a4bc388579a9a)
(cherry picked from commit b439ee918cc5132d2cced8c536a46790f9794b3c)

Conflicts:

	lib/sdk/tabs/tab-firefox.js
Bug 833783: followup, fix exception when calling destroy multiple times.
(cherry picked from commit d4556ce2521960a009c5051b91132de9f6ed9b0f)
(cherry picked from commit 1c315cb1e8cc3ecd5cb0ac34fceda9fa73b41630)
Merge pull request #694 from Mossop/bug817670

Fixes Bug 817670: Catch exceptions from NetUtil.asyncFetch. r=@ZER0(cherry picked from commit 73d8a8b0e8f9b4308ded44d48f35a5173740ddaf)
Merge pull request #680 from Mossop/bug819587

Fixes Bug 819587 - Clean up after some tests. r=@Gozala(cherry picked from commit 430c5a0027108e14c5c1221270855f9444aecaf1)
Merge pull request #782 from erikvold/839872

Fix Bug 839872: context-menu does not emit click event onCommand r=@Mossop(cherry picked from commit 54795f46db436087cee0fc1e5e91d27050b5153a)
(cherry picked from commit 5e1dc2e6a2ae53bc39ad7687b880cbe01c2b1351)
Remove part of tab.id that accidentally was cherry-picked into 1.13.2 r=mossop