usb: gadget: dummy_hcd: move common bits of suspend/resume into one function