Our device has broken roles: they appear to be permanently set to
NONE and don't respond to configfs writes. This causes Android to
not see the USB port as connected, breaking the USB settings.
To repair USB preferences, we spoof roles in the following fashion:
- data role: DEVICE (if NONE)
- port mode: UFP (if NONE)
Implement a USB gadget HAL based on the default implementation from
AOSP and move key features from init.mt6768.usb.rc to it. Also remove
triggers for some proprietary USB features that aren't too useful on
custom ROMs and seem to exist mostly for engineering purposes.
Change-Id: Ie920fea8b3834d3bada2609df66ca68ddbb980b1