Fix assertions in Debug builds about using NetworkDelegate on the wrong thread

We have to create it on the IO thread.
Fix debug assertions about transport_security_state

This code was added to content_shell in
https://chromiumcodereview.appspot.com/16501002 and we never picked it up.
Destroy ResourceContext on the IO thread

This matches content_shell and fixes a debug assertion (and maybe even a
crash).