Fixes to Slider

Clamped value to min and max in setRange.
Allowed min to be same as max.
Added check, if min is the same as max, avoid division be zero.