Adopt Ironic's own context in Ironic and add tests.
Refactor ensure_thread_contain_context to Ironic's own context class,
this will be more generical and not bind to TaskManager anymore.
Explicitly call ensure_thread_contain_context() in Inspector driver for
inspect hardware action.
Change-Id: Ic2bb16a2deb02054b4fca795d431c965e30a246f
Closes-Bug: #1560264