Add a way to trace method cache invalidations.

Set RubyVM::MethodCache.invalidation_log to something that responds to
Fix incompatible pointer assignment.