Status persistence of Layer Chooser: Change to save status on 'overlayadd' and 'overlayremove' events. Instead of checking .overlay everytime a layer is added or removed.

Simplify the code.