Changed DatabaseConnection interface/use Futures

All methods return Futures, allowing the use of database connections
which may take longer than expected (like network based ones).

Also allowed every method to throw IOException in the case of database
access errors.
Finally, removed IllegalArgumentException throws and merged the cases in
which it could be thrown with IllegalStateException.
Added Consumer interface from java 8
Added delegate future convenience class
Added immediate future convenience class
Fixed duplicate word in javadoc

while while -> while
Added Pair (2-tuple)
Updated ClientDatabase to new interface

Now uses futures, and a separate thread to cache the result of those
futures when they are done. Needs extensive testing and review to ensure
correctness.
Added Void immediate future singleton

Since all Void futures are null, and only one immediate Void future
should ever be needed.
Updated Android SQL Database to new interface

Updated to use immediate futures instead of literal results.