Hides legends along with layers

This isn't a very lovely fix and it doesn't follow the nice advice
Javi Santana gave me, but it works for what I need it to do today.

I could not find any events being fired on sublayer hide/show ...
guess I don't know where to listen? So I added some. Although the
sublayers each connect to a legend within the StackedLegend, I
didn't need to toggle them separately, and also couldn't find a
way to do so.

I just added plumbing to bind the whole StackedLegend to listen
to the newly added show/hide events and trigger accordingly.