How ancient African societies used social distancing to manage pandemics