tests: Use coverage

We now use coverage if it is installed to measure branch
and statement coverage of our unit tests.