Tweak to work better with other widgets

Wrapped setVisibleLayers in 'dojo/ready' ready callback to ensure other widgets are 'listening' for layer changes.