Ensure updateLegend happens after adding layer

Add a second event binding to make sure this always happens *after* a layer is added. Use debounce for performance, so that if these two events occur within 200ms, only the later call will execute.
Merge pull request #205 from steventlamb/bug/layer_legend_first_attempt

Ensure updateLegend happens after adding layer