Fixing up nsAutoRef stuff.

Also incorporated some of Caitlin's changes.
Compilation fixes.
Merge branch 'integration' of github.com:RickEyre/mozilla-central into integration