x86-32: Code generator rewrite

The insn_encode() function shows up suprisingly high in performance
profiles and the API is mostly useless for general purpose use.  Rewrite
the code generator using macros similar to what Mono, for example, is
doing.

Signed-off-by: Pekka Enberg <penberg@kernel.org>