tools/l2cap-tester: Refactor L2CAP socket functions
tools/l2cap-tester: Refactor L2CAP socket functions

mapfau/bluez,ComputeCycles/bluez,pstglia/external-bluetooth-bluez,pkarasev3/bluez,pkarasev3/bluez,ComputeCycles/bluez,pkarasev3/bluez,pstglia/external-bluetooth-bluez,mapfau/bluez,silent-snowman/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez,silent-snowman/bluez,pkarasev3/bluez,mapfau/bluez,silent-snowman/bluez,silent-snowman/bluez,mapfau/bluez,pstglia/external-bluetooth-bluez,ComputeCycles/bluez