What were the major political and social structures of ancient ghana, and how did they contribute to the stability and governance of the empire?