added javascript helper to find current layer context

@triblondon @AlbertoElias 

I've added a little utility to make it easier to find a layer's context. Rejigged the docs a bit too