The Dynamics and Evolution of Social Systems. New Foundations of a Mathematical Sociology