Consequences of range contractions and range shifts on molecular diversity.