In the late 14th century, the Songhai gradually gained independence from the Mali Empire and expanded, ultimately subsuming the entire eastern portion of the Mali Empire. What invasion caused the collapse of the Mali Empire