Replaces low-level uses of `Cons` with a first-class `Stack` data structure. Also removes an unused algorithm. Co-authored-by: Jeremy Siek <jsiek@indiana.edu> Possible next step: use `std::stack` instead.