[sgen] Add an optimized variant of qsort using macros. This is 4x faster on sgen-bridge.

The macro produces a custom version of qsort that doesn't use memcpy or a function pointer.
[sgen] Remove the elem_size field from DynArray - explicitly pass it instead.

This reduces the size of DynArray from 4 to 3 words. Small perf gain.
[sgen] Cleanup argument list of dfs1, src is a constant.
[sgen] Wrap DynArray into strongly types variants making the code cleaner and safer.

This paves the way for having different number of objects inline.