fix for btsnoop log blogging HCI socket

Fix for bug 10887611 - btsnoop logging can block HCI socket for longer times.
- Removed the use of the same mutex as the receive queue.
- optimized the code (combined identical code pieces)
- added new function for writing to the log
- switched from using multiple write() calls to using a single writev() (to get atomicity).
patch-set 2:
- fixed review comments (overruns + warnings)
patch-set 3:
- fixed problem with non-matching flags for H4

Bug: 10887611
Change-Id: I16cc23a850093448309ec34c73d536b8571441e9
1 file changed