Rewrite mysql.buildlink3.mk.

This brings it into line with the simpler apache.mk, and adds support
for databases/mysql56-client, as well as fixing some bugs with the
previous implementation.
Update to MYSQL_VERSION from MYSQL_PKG_PREFIX.
Fix variable name.