Detect Bluetooth connection limit
Different devices can support different numbers of simultaneous Bluetooth connections. Since we don't have a way to determine a priori how many connections a given device can support, we should try to detect the device's limit and stay below it.
Related to #1130.