Add JS version of binary tree benchmark.
Handle local variable shadowing.