mozilla: io service: use atomic ops on recursion counter

This works around problems in Komodo using URLs in the wrong thread;
we still need to fix them, but makes Komodo a bit more stable until
that is done.

(integrated from komodo (trunk) change 82608 by marky)

git-svn-id: http://svn.openkomodo.com/repos/openkomodo/trunk@13839 b87d16e7-d29f-4ee1-b5ec-817d645d335f