core/pci: Refactor common paths on slot hotplug
core/pci: Refactor common paths on slot hotplug

Refactor code executed to remove or rescan devices when a slot power
state changes, synchronously or asynchronously through a timer
callback. It will be more useful in a future patch.

No functional changes.

Reviewed-by: Christophe Lombard <44dbcc6389d1dbda026ebe91652384c23cf90057@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <44ca8c041ed925606732b2a0f30e5b73c32761a8@linux.ibm.com>
Signed-off-by: Frederic Barrat <c90240987c583ac0802fbeb88cb1684edc683e18@linux.ibm.com>
Signed-off-by: Oliver O'Halloran <3dfaff8fa6ae977f042064a112a6aac576279b9b@gmail.com>

open-power/skiboot,qemu/skiboot,legoater/skiboot,qemu/skiboot,open-power/skiboot,qemu/skiboot,shenki/skiboot,open-power/skiboot,shenki/skiboot,legoater/skiboot,qemu/skiboot,shenki/skiboot,shenki/skiboot,shenki/skiboot,legoater/skiboot,legoater/skiboot,open-power/skiboot,open-power/skiboot,legoater/skiboot,qemu/skiboot