AST: Cleanup/simplify some LV calculation code

No functional change.
MS ABI: Cleanup some egregious style violations

No functional change.
MS ABI: Use range-based for loops in the mangler

No functional change.
MS ABI: Implement mangling for ref-qualifiers on methods

Mangle ref-qualifiers like the Nov 2013 CTP.

This fixes PR19361.