check whether two 1-D intervals overlap 1: they overlap 0: they don't start1 end1 start2 end2