Optimize opacity clamping

See https://github.com/openlayers/ol3/pull/1894#discussion_r11034473