Improve loop convert's variable aliasing

Loop convert's variable name aliasing may cause issues if the variable is
declared as a value (copy). The converted loop will declare the variable as a
reference which may inadvertently cause modifications to the container if it
were used and modified as a temporary copy.

This is fixed by preserving the reference or value qualifiers of the aliased
variable. That is, if the variable was declared as a value the loop variable
will also be declared as a value and similarly for references.

Fixes: PR15600
Author: Jack Yang <jack.yang@intel.com>



git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@178485 91177308-0d34-0410-b5e6-96231b3b80d8