[delegate] Improve trampoline caching

This must to the same sort of caching that other delegate thunks do.