Xivu: Add helper function extpower_handle_update
Xivu: Add helper function extpower_handle_update

This change adds a helper function extpower_handle_update() that
performs all the necessary actions that need to be done on external
power state change:
1. Call hook_notify with AC_CHANGE
2. Update memmap_batt_flags to update EC_BATT_FLAG_AC_PRESENT
3. Set host event for EC_HOST_EVENT_AC_CONNECTED or
EC_HOST_EVENT_AC_DISCONNECTED.

BUG=b:244831994
BRANCH=None
TEST=Test on xivu,can resume from suspend when plug/unplug AC.

Signed-off-by: johnwc_yeh <a26dca6e8a2810db3758366d77c832dfbf16f917@compal.corp-partner.google.com>
Change-Id: I48000be65184356217ec50415829e3b4099cf871
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3890026
Reviewed-by: Peter Marheine <ef0b2c492edde94778d7465bfbaeed52c5be6858@chromium.org>
Reviewed-by: SamSP Liu <6e4146572079f2780665beb1301eb48d2da00bfe@compal.corp-partner.google.com>
Reviewed-by: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>
Code-Coverage: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec