The previous code did the lowering to alloca, malloc, and aligned_malloc
in a single class with different code paths that are somewhat difficult to
follow.
This change moves the common code to a base class and has a separte
derived class per lowering target that contains the specifics.
Nit: this assumes sizes are dynamic but strides are static, which isn't always the case (I'd actually expect all-static and all-dynamic). This deserves a comment indicating how to relax the staticity requirement in the future.