ressurect optimizeShifts (just in js optimizer and tests), with a fix for ensuring at most one value with unknown lower bits; #2481
bring back optimizeShifts with Alon's fix