Add support for using array of function pointers in CPU core.

This adds automated support for transforming simple, normal
and prefetch CPU cores at build time. The main switch
statement is replaced by an array of function pointers,
with cases becoming functions.

This finally gives decent performance in Chrome and other
browsers using the V8 JavaScript engine. It also seems to
improve performance a bit in Firefox.