Add an InvocationType enum and RewritePolicy

- add InvocationType enum for all kinds of method invocations
  that we rewrite
- our public API should use InvocationType instead of exposing
  handle or instruction opcodes
- use InvocationType instead of Opcodes where possible
- use InvocationType.id() and .fromID() instead of instruction
  opcode for passing invocation type to the bootstrap method
- introduce a RewritePolicy which decides whether a call should
  be rewritten for interception