Cache the value of MterpShouldSwitchInterpreters()

Add field to the Thread object which stores the value instead (negated).
Explicitly update the field when relevant state changes (which is rare).

This speeds up golem interpreter benchmarks by 3.5%
on average with some benchmarks up to 15% faster.

Test: test.py -b -r --interpreter --host
Change-Id: If2df0d3bf9e69ab50c30102b2648e997927c34d8
21 files changed