Ensure test_agent_manager handles random hashseeds

Several tests in test_agent_manager.py fail when tox is run using the
hashseed 2701526934, this is down to the nature of using dictionaries
and sets in Python causing some function calls and function arguments
to be out of order. This patch fixes this by either specifying that
assert_has_calls does not need to assert the order, just that the calls
were made, or by letting the unit test get affected in the same way as
the code, e.g. add variables to a dict so they are ordered by the python
hashing algorithms in the same way as they would be in the real code.

Change-Id: If83d1f33c187eab45c2a65fd50fd70cce011c9e7
Partial-Bug: 1348818
Merge "Ensure test_agent_manager handles random hashseeds"