
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com> This is a squash of the 42 commits by @mshlyn, as I couldn't find a way to break them into logical chunks. I did not include these in the build, as it appears that they only partially work anyway, and much more cleanup is still needed. However, this is a huge improvement on what was in the tree before, which looked horrendous and didn't even compile (as it was designed for the old stack). Mostly fixes #812.