Strengthen the test case for loop-unrolling.

So the index might not just be a symbol, but could be expression.
Also, see if the index used as function param also get replaced with value while unrolling.

This is added due to bugs in the attempted implementation.
Merge pull request #483 from zhenyao/loop

Strengthen the test case for loop-unrolling.