convert the single use of collect_stmts to collectStmtsSTL and then tweaked collectStmtSTL to include While statements
Add isWhileStmt() to generalize isWhileDoStmt and isDoWhileStmt
Add copy and codegen utilities
Introduce a virtual isLoop() on BaseAST and leverage it in checkControlFlow()
Adjust find_outer_loop to have a more general sense of what a loop is