Individual Strategy and Social Structure: An Evolutionary Theory of Institutions