Handle following Ksync State Machine state change for an entry

Add Defer --> Del defer due reference --> Add Defer
Added test case for the same.

minor correction is gdb macros.

Change-Id: I7c6b03eb93aec07f032de9a4ca95c7411c4188a8
Merge "Handle following Ksync State Machine state change for an entry"