Tilelayer 'loading' event tests

Tests for #2802.

Having to inject the Leaflet css and add the map div to the DOM feels weird, but the panning tests don't fail unless the map is properly styled and a part of the DOM.