Only write segments for specified blocks

As written, writeSegments was writing and associating all segments
passed to it with all blocks passed to it. Instead only write segments
to associate with blocks for which they overlap. Also rename associated
method to overlaps, and remove dead method prototypes.