Use itertools.count() instead of time.time() for determining teardown order.
Merge branch 'feature/issue-515-fix-intermittent-middleware-teardown-ordering-test-failure' into develop