improve BoolSpec:constrain

can now handle array input
add 'range' type to shared_value Udef
add peak and value_to_range UMapDefs