Convert phpcs/phpunit to library usage.

The CLI interface isn't fully meant for programmatic consumption.  This is especially true for phpunit where the coverage statistics are somewhat shoehorned in to fit to clover.  Instead, by accessing them using their library API, we ensure that we are getting the info we desire and in a much less fragile and much more portable way.