magit-tests.el: Fix issue causing tests to fail with my changes

* Wait for async git process to complete before trying next test
* Kill current magit cilent buffer if one was created for a test, and the test passed; this prevents a
  ton of magit buffers from piling up after some interactive test runs