java: Generify switch opcode parsing

Generify lookupswitch and tableswitch parsing in the verifier in
preparation for using the logic in the translator.

Signed-off-by: Pekka Enberg <penberg@iki.fi>