Merge changes from topic 'taskrunner_details'

* changes:
  TaskRunner starts the background thread only when needed
  Simplify the implementation of TaskRunner.
  Move TaskRunner and SynchronizedQueue to details