ACPI / PM: Hold acpi_scan_lock over system PM transitions

Bad things happen if ACPI hotplug events are handled during system
PM transitions, especially if devices are removed as a result.
To prevent those bad things from happening, acquire acpi_scan_lock
when a transition is started and release it when that transition
is complete or has been aborted.

This fixes resume lockup on my test-bed Acer Aspire S5 that happens
when Thunderbolt devices are disconnected from the machine while
suspended.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'acpi-pci-hotplug-next' into bleeding-edge

* acpi-pci-hotplug-next:
  ACPI / PM: Hold acpi_scan_lock over system PM transitions