optimize findVariable() in no-unused-vars

This is the lowest-hanging fruit - findVariable() was taking a
significant portion of the overall time due to a linear search of
all variables. The first step, with the smallest change to the
code, was to add a map of variable names to indices. Look up the
variable by name, then get it by its index in the existing list.
refactor variable name lookup into a separate function
migrate variables array to map
Merge pull request #592 from btmills/faster-find-variable

WIP: Optimize findVariable() in no-unused-vars (refs #574)