Add :connection_handling=>:disconnect option for threaded connection pools

This option always disconnects the connection, instead of returning
it to the pool.  The expected use case is for people who want to
manually control all checkouts.

For example, let's say you have a web application that modifies
the connection state in each action.  You don't want a connection
used by one action to be used by another action, since you don't
know the state of the connection.  Also, later queries in the same
action may depend upon the state of the connection set previously
in the action, so you need to use a consistent connection for the
entire action.  In this case, a rack middleware that used
Database#synchronize around each action and used
:connection_handling=>:disconnect when connecting should work.
Add :where option to validates_unique, for custom uniqueness filters

validates_unique already takes a block, but the block is used for
scoping the existing uniqueness filter to a subset of the model's
dataset (for example, only validating uniqueness for active users
as opposed to all users).  This doesn't allow you to change the
actual filter used for uniqueness, which is necessary if you want
to do a case insensitive uniqueness validation for a database
that is case sensitive by default.

The :where option is used instead of the default filter, allowing
custom uniqueness checks.  In addition to case insensitive
uniqueness validations, it probably could be used for validations
of PostgreSQL exclusion constraints.
Allow subclasses plugin to take a block, which is called with all subclasses created

This is useful if you are creating subclasses at runtime.
Previously, if you wanted to make a specific change on a per
class basis to each subclass, you would have had to
periodically check descendents and look for new classes.
With this change, you can easily make such a change as soon
as the subclass is created.
Cleanup created tables in the integration tests
Cleanup created tables in the mysql, mssql, postgres, and sqlite adapter specs
Add bin/sequel -c support, for running code string instead of using an IRB prompt

You could previously have done this by piping the code to the
standard input, but this is definitely easier.  Would have
preferred to use the -e option so that executing code is similar
to ruby, but since that was taken, I choose to use -c since that
is similar to sh.
Cleanup created tables in the oracle adapter specs
Fix validation_helpers spec after code change
More cleanup in the oracle adapter specs
Make Time->DateTime and DateTime->Time typecasts retain fractional seconds on ruby 1.8 (Fixes #531)

On ruby 1.9, the typecasts just use Time#to_datetime and
DateTime#to_time, but those methods aren't available in ruby 1.8.
On ruby 1.8, a conversion is done through string, but that wasn't
including the fractional seconds.  Manually include the fractional
seconds for both type conversions on ruby 1.8.
Refactor postgres adapter to work with new sequel_pg streaming

PostgreSQL removed the streaming support added in 9.2beta1, and
replaced it with a different API in 9.2beta3. The new API
uses separate PGresult objects for each row, so in those
cases, the connection execute methods return the connection
itself instead of a PGresult object.  Since the returned object
may not respond to clear, only clear it if it responds.

The _execute_prepared_statement method is being split off for
easier overriding.
Fix Rdoc typo for set_restricted_columns
No longer handle model classes as tables in join/graph methods in plain (non-model) datasets

Since 1.4.0, Sequel has checked the table argument when joining
and if it responded to table_name, it assumes it is a model
class and calls the table name argument on it.  I believe the
reason I choose to not directly depend on the Model class was
that I didn't want to couple the core and model layers.

Unfortunately, the current code has two flaws.  First, calling
respond_to? on arbitrary objects is not a great idea, since
other libraries may add methods with the same name to the
object.  For example, a String#table_name alias of #tableize.

Second, and more importantly, though model class's usually
represent the selection of all columns in a table, that is
not true all the time.  If a model's dataset isn't a simple
selection of all columns in a table, then joining just to the
table name is wrong, it should join to a subselect of the
model's dataset.

For that to work, it needs to recognize model classes and deal
with them.  Since core and model are decoupled, that cannot
happen at the core layer.  So the code to handle it moves to
the model layer.  There are two backwards incompatible side
effects of this change:

1) You can no longer use arbitrary objects that respond to
   table name.
2) You can only use model classes when joining to model
   datasets, you can no longer join a model class into a
   plain dataset.
No longer handle model instances in plain (non-model) datasets when inserting

Similar to the previous change, don't check respond_to and assume
the type.

When I took over maintenance of Sequel, Dataset#insert_sql had
a hard-coded check for Sequel::Model, which I replaced with a
respond_to check as the core should not depend on the model layer.

Unfortunately, values is not an uncommon method name, so it's
possible that other libraries can define the values method and
break Sequel.  This has already happened before, which required
checking that the result of values is a hash.

This moves the handling into Sequel::Model, and only handles
model instances.  Additionally, it contains a fix that allows
the pg_row plugin to work correctly.  Previously, if you provided
a model instance that used pg_row as the sole argument to
Dataset#insert, you would get an error, since it would use the
model's values as separate columns.

As before, the backward incompatible changes are you can no longer
just define values and you can only use model instances in model
datasets.
Attempt to recognize CURRENT_{DATE,TIMESTAMP} defaults and return them as Sequel::CURRENT_{DATE,TIMESTAMP}

Previously, Sequel converted current date/datetime defaults to nil.
This makes :date/:datetime fields check default values against a
simple regular expression and return Sequel::CURRENT_{DATE,TIMESTAMP}
if it appears to be a current default.  As the default values for
date/datetime columns are more likely to be a current value than
any other static value, this makes default parsing more useful.

While here, refactor Database#column_schema_to_ruby_default and
split it into more methods that handle different parts of the
process.
Recognize timestamp(N) types as :datetime

Oracle appears to use this type by default for Time/DateTime.
Skip CURRENT_DATE spec on Oracle

Oracle doesn't have a real date type, it's date type is really a
datetime, so you get CURRENT_TIMESTAMP instead of CURRENT_DATE.
Fixed an example on insert_multiple and added a spec for it.
Fix non-determinism due to hash order on ruby 1.8 in recent spec change
Allow Dataset#count to take an argument or virtual row block

Previously, count always did count(*).  However, count(expression)
can be used for counting the number of rows where expression is
non-NULL.  Previously this was fairly easy to do via:

  dataset.get{count(expression)}

but this makes it even easier:

  dataset.count(expression)