Merge "Detach children when stopping app." into pi-dev