Add a callback for when the layer is loaded.

I added support for an 'onload' callback when layers/vectors are loaded.  I have tested this with the AGS layer, but don't have any automated tests for the other layer types.