Bug 996988 - add more logging, remove listener as late as possible, to get more info about what circumstances are triggering our listener not getting called, r=test-only/firebot

--HG--
extra : rebase_source : bab908e94b023a478b5d56d333344dcf3be10274