core: Fix handling mgmt socket write failures
core: Fix handling mgmt socket write failures

If a write to the socket fails we should properly notify the command
callback and remove the command from the queue.

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