get Overlapping Intervals
This function takes 2 sets of Kotlin IntRange and returns a Set
To guarantee accurate results in the case of a user calling this function directly with unsorted sets, the sets are sorted again here.