Add merge of edgeintervals that share the same extendI so we don't need to do the same backward extension multiple times.

Also implemented better read and write from files in interval manager for EdgeInterval-s and JoinedQInterval-s.