Make the test suite return an reasonable exit code
Make the test suite return an reasonable exit code

Test.QuickCheck.Batch.runTests doesn't return any error statistics,
which makes the test suite just display errorrs and always exit with
exit code 0. This is not good, since one cannot then actually batch run
tests.

This patch adds a wrapper over Batch.run which also modifies a passed
IORef Int to keep track of how many test failures or test aborts we had.
This makes it easy then to exit with an appropriate exit code.

apyrgio/snf-ganeti,andir/ganeti,yiannist/ganeti,leshchevds/ganeti,mbakke/ganeti,grnet/snf-ganeti,yiannist/ganeti,apyrgio/snf-ganeti,dimara/ganeti,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,apyrgio/ganeti,ganeti/ganeti,bitemyapp/ganeti,yiannist/ganeti,leshchevds/ganeti,andir/ganeti,mbakke/ganeti,bitemyapp/ganeti,onponomarev/ganeti,leshchevds/ganeti,onponomarev/ganeti,grnet/snf-ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,apyrgio/ganeti,andir/ganeti,ganeti/ganeti