WIP: Detect Bluetooth connection limit
This branch tries to detect how many simultaneous Bluetooth connections the device can support and stay below the limit.
In general we can't tell whether a connection has failed because we exceeded our connection limit, or because the remote device exceeded its limit, or due to some cause unrelated to limits, such as the remote device moving out of range.
I tried several approaches to this problem and found that approaches based on detecting failures tended to give poor results: devices that were capable of supporting many connections, but which had peers that were unable to do so, would detect failures caused by their peers and tend towards the same limit as their peers.
Similarly, rejecting incoming connections, or closing the oldest/newest/longest-idle connection to get back below the limit, caused dynamic interactions among peers that made it difficult for them to measure their own capabilities.
Ultimately I settled on a simple approach: impose a limit on outgoing connections but always allow incoming connections. If incoming connections push us above the limit and the connections remain stable, raise the limit.
Closes #1712 (closed)
WIP because an even simpler approach might work better.