magit-tests.el: merge version from master
magit-tests.el: fix and cleanup

We had serious problems running tests on travis.  This commit issues
addresses these issues and also makes the tests much more readable.

One test was removed in the process.  But as far as I can tell that test
ended up testing functions from Emacs not Magit.  After that removal one
test remained which required library `mocker'.  It was rewritten to
simply use `flet', we don't need mocker anymore.