[bluez] Fix some minor memory leaks. Fixes JB#10868.

Applied upstream commit d0f08e050a36fa6092ac151541f51b7d15768784
and fixed a handful of other memory leaks found by valgrinding
and reading the code.