Optimization: Re-use regexes in `getValueByKeys`

Creating a new `RegExp` every time this method is called is slow. It was one of the pain points that showed up in the browser script profiler.

This optimization is one of many necessary to get the frame rate consistent enough for virtual reality applications (#57).