Fix Bluetooth tethering

Ignore linkstate down events for bt-pan interface which cause its remove. Interface should only be removed when we receive the interface remove event. At connect init to bluetooth PAN service, bridge pan device adds tetherable bt-pan interface as set in bluetooth regexs. Before bt-pan interface gets tethered, multiple linkstate events are received by linkstate change notifier. Receiving multiple time of linkstate down may cause remove of tetherable interface (bt-pan), before we call tether method. Finally when tethering method is called and bt-pan tether interface is removed, error is returned because of not available tetherable interfaces. Bug found during bluetooth PTS PAN testing. It affects multiple test cases.
Improve scrolling cache
Scrolling cache helps make short scrolls/flings smooth but will
cause stutter when long flings are made. This patch disables
scrolling cache when long flings are made.

This patch also fixes a related bug where scrolling cache will
not be enabled properly when transitioning from flinging to scrolling.

Patch Set 2: Calculate threshold based on maximum velocity (Sang Tae Park)

Credits: Pawit Pornkitprasan

codebuged authored
SystemServer: Move sensor init to a new thread.

Move Sensor init to a separate thread so that it doesn't block the
critical booting path.

Initializing Sensors in separate thread has been seen to improve boot
time on customer devices with low-tier / ult chipsets(less cpu cores)

Change-Id: I5c46a5805c04ffe551019b4683523e3bf70274a2
LMK for low-tier devices, and limit BG apps