Making RTree's find more efficient

By doing the type check before the intersection check, we can
save he intersection check for cases where we don't care about
type or have the specified type in a node.
Merge pull request #715 from ahocevar/rtree-performance

Making RTree's find more efficient. r=@bartvde
Properly reset the dirty flag

Currently, the dirty flag is never reset (to false).  This is a bug.  Because renderFrame is called very often (every layer render gets called when every other layer needs to re-render), it is criticial to know when we can bail out early.  The dirty flag is currently the way that the vector layer renderer knows that it needs to do more work.  On an empty cache, the renderFrame method of the vector layer renderer is called ~30 times for a single zoom in the vector layer example (due to tiles loading on other layers).  Without this change, we miss the fast path out and clear/re-render the canvas all 30 times.  With this change, we are only clear the canvas and redraw 6 times in a typical zoom animation.
Merge pull request #718 from tschaub/dirty-frame

Properly reset the dirty flag
Clean up attribution control.

do not use map.getLayers() anymore, but get layers from frameState.layersArray.
Remove unused attributionElementRenderedVisible_.