libopencash: fixed removing child from parent when setting parent to NULL, fixes android as well