More work on pre-generating asmjs snippets for reassembly.

Most tests seem to be working, a few edge-cases remain.