common.c: Fix memory leaks
In message to creators of issues 119 and 101 on bluecove's google code
site:
Hi,

Yinz two posted bug reports for bluecove memory leaks. I work on a
project that uses the bluecove libraries to accept bluetooth
connections. That doesn't happen too much anymore, so I noticed more and
more memory leaking through the bluetooth section, which was just
waiting to accept a connection.

This happens on the C side, where it loops through a non-blocking accept
call, a check to see whether the thread was interrupted, and a thread
sleep before the next iteration.

Both of those last calls are calls back to Java from C, and those obtain
handles to classes, which are not released. Since the accept loop will
only exit when a connection comes in, the garbage collector may never
get the opportunity to reclaim the wasted memory before it is exhausted.

The leak.diff patch addresses this. Please make it and this text
available to the bugtracker. I can't be bothered to apply for a Google
account.