Fixes parsing of server version for locales which
use "." as grouping separator, e.g. German locale.
Merge pull request #190 from golovnin/Utils_parseServerVersionStr_fix

Fixes parsing of server version for locales which use "." as grouping separator

This is a useful fix to my earlier commit f20437b2a7f8140c81215bc104b0f1109be8263a in pull request #169 to use `server_version_num`.
Checking the lower case version of the column name before the upper case
version since it is much more likely to match.  In the default case when
the column sanitiser is enabled then the upper case version of the name
will never match.

This gives a minor performance improvement.
Merge pull request #191 from dmap/findColumnIndex

Minor performance improvement in findColumnIndex
Avoid a classloader leak through a dangling statement cancel timer thread.

When the driver class was loaded, it started a Timer thread that was used
to cancel statements on timeout. This timer thread was never stopped.

When the class is loaded in containerized environment (web container,
ee container, ...) this might lead to eventual permgen depletion when the
deployment with the driver is merely reloaded (which may involve reloading
the classes of the deployment) repeatedly.

The timer thread holds on to the protection domain of the code that created
it and that protection domain holds on to the classloader that is used to
load the classes. Through this chain of references, the dangling thread
cause the classloader of the "previous" deployment to never be GC'ed and
its classes unloaded.

The fix is to track the usage of the timer by connections using reference
counting. Connections acquire a "loan" of the timer when they're created
and release it when they're closed.

Note that exactly the same issue existed in MySQL JDBC driver where it was
fixed in 2009:
http://bugs.mysql.com/bug.php?id=36565