Add optimized stored procedures.

At this time, the Java driver code does not use these stored procedures
yet. These procedures should eventually replace the clumsy Java code
that currently does inserts. SQL can do a much better job optimizing
these queries than we can manually and it will reduce the amount of data
sent over the local socket as well.

In addition, setting the following in /etc/mysql/my.cnf can help
greatly reduce "query end" times at the cost of slight durability loss on a
crash:

innodb_flush_log_at_trx_commit=2

This only affects transactions.
Merge branch 'master' of github.com:rafiss/transparent