var scope variables to make component thread safe

I found we were getting errors like Element at position [1] doesn't exist in array and after a bit of debugging I found that var scoping the arrays fixed the issue.

Tested on Railo 4.1.2.005