[Extensions] Use a IO message loop for extensions running in a thread

Some extensions (like the RawSocket) will need this kind of main loop
for watching file descriptor events. The Chromium Socket implementation
asserts when used in a non-IO message loop.
Merge pull request #815 from tmpsantos/io_loop2

[Extensions] Use a IO message loop for extensions running in a thread