More entrypoint handling cleanup.

- Move entrypoint initialization to instrumentation class.
- Move logic to know whether we should stay in the switch interpreter in
  the interpreter itself.

Test: test.py

Change-Id: I7e434ad0609b48c86ee601421d099934e8cd4d80
9 files changed