Make host side of Read Local/Remote Extended Features more reliable

Issue Ext feature request only if the local controller supports
the command. Fall back to read remote feature command,
if the extended feature request fails
Bug:8591628

Change-Id: I744d9845c04b30d2dca1fd491fea49616adbb2d7
merge in jb-mr2-release history after reset to jb-mr2-dev
Audio glitches while playing songs over MOTO S305 headset

The MOTO S305 doesn't support read remote extended features command.
The fix is we should always use ReadRemoteSupportedFeaturesCommand at first,
Only send ReadRemoteExtendedFeaturesCommand if extend features are supported
by remote device.

issue 8618753

Change-Id: Id6d9c0e712dc892bcfca20336d1290b9443213ac
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
Solve compilation problem when BLE/GATT/SMP features are false

bug 8664724
Change-Id: I582846ccf4b8995f298d8db533488fceb7993ae3
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
merge in jb-mr2-release history after reset to jb-mr2-dev
Do not abort bonding if link disconnects during SDP after Auth cmplt

If ACL link gets dropped during service search after bonding,
re-attempt service search instead of setting bond state to BOND_NONE
Bug 8611134

Change-Id: I77672d9f4feab634b3795a41e0d4e58903b5d275
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
Bluetooth: Added HFP features bitmask function.

This function gets excuted when application
sets the value of HFP features support and
ignore the stack's default bitmask.
CRs-Fixed: 482189

Change-Id: I4d4459c92980d145ffbbb60a3c4ebf6ddb0266cb
SDP: Fix for SDP query in certification test with Invalid PduSize

Bluedroid stack is only checking parameter length and input data length.
Added an extra logic to handle invalid data after getting last valid data.
CRs-Fixed: 491693

Change-Id: I607fbae8b40356d7ddb5dc5805e7c774e3f39137