The OED cites Langland’s, Piers Plowman (1362 - OED’s date) as the earliest source for either sense. At the same time, according to OED, there is a recorded instance of use in the Old English for the first sense, at around 1000 C.E. (though this might not necessarily mean that the second sense would not have been in use simultaneously).
The first sense (Senses relating to spittle or mucus), according to OED, includes the obsolete and transferred, for instance related to water, meanings of ‘to let flow out of a crack’ (1707 J. Stevens tr. F. de Quevedo Comical Wks. 481 This crack'd Pot..drivels out the Water.), transitive, and of ‘to flow ineptly’, intransitive (a1774 O. Goldsmith Surv. Exper. Philos. (1776) I. 404 The water..will not spout at all, but drivel down the side of the vessel.), intransitive.
In your example “'The waves hardly made any noise as they struck the cliff, and they drivelled backwards slowly'.”, ‘drivelled’ is intransitive. Though the author does not use ‘drivel on’ but ‘drivel backwards’, perhaps the sense ‘to go on in a feeble manner’ might still speak to the author's intended meaning. At the same time, ‘to flow ineptly’ - the obsolete, according to the OED, transferred usage in the first area of senses - conveys a closely related idea.