[PATCH 6.6 305/322] pds_core: Rework teardown/setup flow to be more common