optimize: RefTable is needed only for garbage collector.
optimize: Decrease scratchpad memory fragmentation (don't fall below watermark).
optimize: CompileTypemask: precalculate exact typemask vector size.

To avoid reallocs/fragmentation.