Chained callbacks for onDataSent

Changed onDataSent to use the same callback mechanism as onDataWritten.