8x performance increase.

Most significantly, added an "if" statement to use the native element.getBoundingClientRect() method, if available, plus a simple benchmark. The benchmark shows a ~8x speedup over the offset/scroll comparison method in Chrome. I made the comparison by disabling the getBoundingClientRect() check, running the benchmark, re-enabling it, then running the benchmark again.

Also, a few changes to avoid unnecessary object creation and DOM calculations. I didn't fully test this, so keep that in mind.