CRAS: delay callback deletion until end of main loop
CRAS: delay callback deletion until end of main loop

A callback function may remove multiple callback structures from the
linked list, including the next one in turn. To avoid use-after-free
bugs only flag a callback as deleted and cleanup later.

BUG=none
TEST=compiled, run and unit tests

Change-Id: I29b697206936f06e49f8e4e21fa5a3cb83148b1f
Signed-off-by: Scott James Remnant <6b88cbe64f92c5d64ffbf57d7b3d2efc0467fe34@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39315
Reviewed-by: Dylan Reid <c791bfe44996c1eed9c7149a0c5f12a86d58eb85@chromium.org>

drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd,drinkcat/adhd