Hanging dependency records bug fixed

Previous commit (f6eb68aae8855f2b26fd245d66efae5b4e653b1f) fixed
the bug at the cost of quadratic step time. This one fixes the
time back to linear.

	modified:   population.cpp
	modified:   population.h
	modified:   populations.txt
	modified:   relation.h
	modified:   totalPopulation.cpp