add more debugging output

Change-Id: I91be83485dcd829800ca9611ab54b19d8eae19af
add assert to detect double delete

Change-Id: I13427cb698d29adb1d19b135ada91bcdfc8b8c92
more asserts to detect double deletes

Change-Id: I54284d34db2446f28ba778ce26ebedb584bf2780
prevent crash when creating the platform context failed

It is not a double delete. It happens when creating the platform context
fails and therefore is not added to the list.

Change-Id: I2771da48a5d791bbf500b56d8734dd53b32f3fb7