fix #1149 using 2 phase layer loading

ActiveGeoNetworkRecordStore will load collections in 2 steps. the first
step is to insert the layer into the store, the second would be to mark
it as 'loaded', so the download InsertionService knows what collections
are loaded and can be displayed in the cart and what collections are
still loaded. after a collection is fully loaded it'll trigger a redraw
of the cart.
Not really, I want it to be called after this AJAX shenanigans.

So if there's no WMS link -> call it immediately as there's no AJAX call.
If there is an AJAX call (like the line above) -> call it after the AJAX call has returned.