Add phpunit to require-dev and use it to run tests

Move from PEAR workflow to composer.