TotalPopulation class is tested + tidying

A bug is found - the removal worked within the loop iterating over
list, from which elements were removed. Some general tidying
applied.

	modified:   population.cpp
	modified:   population.h
	modified:   relation.cpp
	modified:   relation.h
	modified:   tests/testTotalPopulation.cpp
	modified:   totalPopulation.cpp