writeback: move bdi threads exiting logic to the forker thread