Updated Legend.js

Updating of legendClass/position variable when legend changes
Removing of leafletLegend when legend gets set to undefined