Fix inheritance issue with return types

Return type variance is now checked properly for classes that extend
other classes, including abstract classes; previously only interfaces
worked properly.

Note that this fix introduces an issue with opcache.