refactor - reduce CTFE memory consumption pt 1

Currently, CTFE allocates memory for every step in its computation. This can result in an enormous amount allocated. This is the first step towards using stack memory instead.
If it doesn't use features that the current frontend code doesn't use, it will probably translate easily to D.