Implement a virtual method cache

This should help reducing a bit the overhead of some function calls. It's actually difficult to say whether this helps or not because the profile data is fluctuating, but the profiles with the patch applied seem consistently better.
This is expensive. Do this lazily once and cache it on methodInfo. Also, don't do this in the JavaScript call. JS calls are expensive. Do it at the call site.