Avoid shutting down of a passed executor

For the case where an executor is being provided we
should not shutdown the executor on-behalf of the
provider since they would likely expect that they
can still use the executor elsewhere. If the executor
is shutdown then further usage is not possible.

Change-Id: Ia83d8c2f1df06200e32e9b0c7340f32e74fd5d85
Add a timeout object that can be interrupted

Add and use this object to make it so that the worker
executor notifier can run and also be interrupted when
its owning thread is finished (thus allowing it to be
finished before the timeout is reached).

Change-Id: Ice9f3b74b894dd7a76ab94ba4561b9405eba0206
Drop obsolete test_unordered_flow

Action engine tests were modified to keep few cases covered.

Change-Id: Ibfcdd5378605532a4eb3fb1a43a70532a771ea16
Linear flow: mark links and rework unit tests

- add 'invariant': True to all links produced by linear flow;
- write new unit tests for basic functionality of linear flow
  pattern;
- remove some simple now-redundant unit tests from
  test_flow_dependencies.

Change-Id: I1f4fa8a1dfc61485555a10e8d0629a67aab1997f
Unit tests for unordered flow

This change adds unit tests that check unordered flow methods
without loading it into engine and executing it.

Change-Id: I665b6fe070759061edf7a7da4f117c0269c9c3cf
Rewrite assertion for same elements in sequences

New version is able to compare sequences whith elements that are not
hashable and cannot be compared (so that sorted() does not work).
For that, a utility function that caluclates difference between two
sequences was added. This function was also used in retry.ForEachBase.

The assertion was also renamed to assertItemsEqual, which matches
same assertion that was added in python 2.7.

Change-Id: I2b1b811190e9dc51718e4ca17ffc5c9015c34dc4
Rework graph flow unit tests

This commit adds unit tests that check graph flow methods without
executing or flattening it. Now-redundant tests from other test
suites are deleted.

Change-Id: I8dafe0f9b295428831eddb3f9fd48f042d2f1ffc
tests: Fix WaitForOneFromTask constructor parameter introspection

Strings are iterable, so the check in WaitForOneFromTask was
effectively useless. This lead to TypeErrors (caught by transition
notifier) when it tried to find None in 'task1'.

Change-Id: I3e91029f7b7cb960d6ca84490de76b5e044bc238
Merge "Add a timeout object that can be interrupted"
Merge "Avoid shutting down of a passed executor"
Merge "tests: Fix WaitForOneFromTask constructor parameter introspection"
Merge "Linear flow: mark links and rework unit tests"
Merge "Unit tests for unordered flow"
Merge "Rewrite assertion for same elements in sequences"
Merge "Rework graph flow unit tests"
Merge "Drop obsolete test_unordered_flow"