Introduce simple predicates to allow code-base to query the specific loop sub-type
Introduce a virtual method checkConstLoops() on BlockStmt and then move the current implement for WhileLoops from checkResolved to WhileStmt
And the update to checkResolved itself
Simple cleanup
Merge pull request #676 from noakesmichael/loopCleanup

Loop cleanup

1) There is currently code across the passes that wants to distinguish different variations of loops.
Add a set of virtual methods on BlockStmt and then override appropriately in While/For loop.

2) passes/checkResolved contained an entry point and several helper functions that were
specialized on WhileDo/DoWhile.  Introduced a virtual function on BlockStmt and overrode
the case for WhileStmt

Compiled STD Clang on Mac, STD/LLVM GCC on Linux
Testing Full paratest  STD --verify and LLVM --verify
Review: None