Sort legendLayers when auhtor sort legend ui.

Add open/close all on legend items. Add clusters capabilities.