java: Move opcode helpers to separate header

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