Making some public members into private members. This also introduces a bit more const-correctness, and now uses some range-based for loops. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206503 91177308-0d34-0410-b5e6-96231b3b80d8