What was replaced only gradually with the spread of the Mesolithic Revolution