SHDP-436 Add exit wait to poller task

- These fixes should make it better in cases where
  background task is doing rename operation or something
  else which needs to finish. Now during a lifecycle stop
  we can define if result will get requested which should
  be enough for current operation to finish.