improved read trimming to remove N bases, mutex around push(contig)