do_mysql extconf.rb cleanup / compatibility fixes
do_mysql extconf.rb cleanup / compatibility fixes

This removes some weirdness from do_mysql's extconf.rb and makes
it build out-of-the-box across a wide range of systems. This has
been tested on recent versions of Ubuntu, Debian, Fedora,
FreeBSD, and MacOS (w/ MacPorts) with and without the use of
mysql_config and seems to work well everywhere.

There are a couple of things worth noting about the different
ways extensions that use an external XXX_config program can be
configured. The first example should work on all systems with
standard mysql installs. The other examples are given for custom
installs (e.g., under /opt/mysql or $HOME).

Attempt to automatically configure the library using the first
mysql_config (or mysql_config5) found on the PATH:

    ruby extconf.rb

Build using a specific mysql_config (e.g., installed under $HOME):

    ruby extconf.rb --with-mysql-config=~/bin/mysql_config

Build without mysql_config and an explicit lib and include dir
(e.g., installed under /opt/mysql5):

    ruby extconf.rb --without-mysql-config \
        --with-mysql-lib=/opt/mysql5/lib/mysql \
        --with-mysql-include=/opt/mysql5/include

Also worth noting is that some of the functionality included in
the previous version of extconf.rb has been removed entirely in
this patch. For instance, the original extconf.rb seemed to allow
setting various mysql configuration options via MYSQL_XXX
environment variables.

simonkro/do_mysql,simonkro/do_mysql,simonkro/do_mysql