When a retry atom or a task atom changes state it is quite useful
to know the prior state the atom was in; to make this easier pass
that information along in the details about the state transition so
that observers can inspect it if they desire to.
This matches more closely with the flow notification which does
include the prior state (under the details key 'old_state') so this
also increases the uniformity of notifications in general.
Change-Id: I7df1fcc60ba178198776ddaa2681caee5811c4ff