Fix trait mocking under HHVM nightly.
Improved mock generator tests.