Spawn and stop threads appropriately when running under Passenger