Coverity Fixes in BTAPI and BTHAL