Implemented trait mocking.

See sebastianbergmann/phpunit-mock-objects#114, sebastianbergmann/phpunit-mock-objects#113, and sebastianbergmann/phpunit-mock-objects#112