Randomize test ordering and fix issues in CLI tests found by this

Shuffle test cases before running tests to avoid interdependence
between test cases.

Fix non-deterministic failures in CLI tests due to shared
state between concurrently executing async tests. Create a new
instance of the CLI and supporting fakes for each test.