Improve Stalker's performance by introducing caching support

This is disabled by default and must be explicitly enabled when
the code is known to be sane and not self-modifying.
Speed up Stalker performance test by tweaking number of repeats