Use stack lock context manager in abandon & delete

This will ensure that the stack lock is always released when there is an
exception.

Change-Id: I6d65c57d8b92107eb84c5ed1fbfd5eca30bace01
Partial-Bug: #1321011
Merge "Use stack lock context manager in abandon & delete"