Remove whitespaces at EOL

Whitespaces at EOL are completely mad. I know that such kind of change
create a kind of mess in the project history, BUT it looks much better
without stupid spaces-at-eol. Empty lines must be empty.
Replace custom TGLock class with ReenterantLock

TGLock class should be removed because generic (and error-prone) Lock
implementation already exists in JVM 1.5+.

Also it is recommended to use try-finally block when Lock is used to
make sure that lock is unlocked even when an exception occurs inside
block.

There are two pitfalls found during the fix:

 * try-finally block is not implemented in TGShareSong class, because
   lock and unlock are used in different methods (and I didn't have much
   time to find where try-finally should be placed in that case)
 * There are found several checks that are not really thread-safe.
   Anoter thread can acquire the lock between isLocked() and lock()
   calls. We must replace these if's with more proper solution
Code cleanup in MidiPlayer class

 * fix javadocs
 * remove unused methods
 * possibly memory leak found