The W3C standard says that setAttribute/getAttribute on any DOM element is
a simple setter/getter thing. IE8 tries to be smarter and returns the full
URL when calling getAttribute('src') on an image instead of the one that
was set with setAttribute('src').
This change makes sure that urls are compared properly, also in IE8.
There are still tests failing, but this change addresses some of the new failures after 4b163e0482 (which is an awesome improvement despite the test failures :).
Having the TileManager remove an image from the DOM, then setting the
cached image, and then having to position it felt a bit awkward. With the
new beforeload event, the setImage method and putting renderTile before
positionTile, providing the cached image feels way more natural.