Don't create new threads for each instance

See the commit message for the second patch for summary. Essentially this is changing from creating threads for each extension instance, to use a shared thread for them. Internal extensions will use an "extension thread" and external extensions (in the extension process) will use the main thread there.

I wrote down a detailed description here too:
https://docs.google.com/a/intel.com/document/d/1Vu1zo5zLI0sIZ62cBq-YUTpA0Lm3G_dwDyLU2hU4tH8/edit?usp=sharing