Support for reporting code coverage to teamcity

It's not my prettiest code, but this should allow people using coverage and pytest to report their code coverage stats to teamcity. WFM, but YMMV :)
rebase this out of the commit