x86-32: New code generator

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>