Add support for temporary views by having Database#create_view accept a :temp option.
Added integration test for creating temporary views.
Add Database#supports_create_or_replace_view? private method

This will be used later after some refactoring.  H2 also
appears to support the syntax, but does not appear to work
correctly when using it, so it is not marked as supported there.
Emulate Database#create_or_replace_view if not supported directly

Refactor the existing code to make it easier to override in the
adapters.  Remove core support for temporary views, since only
PostgreSQL and SQLite support them.
Add support for temporary views on SQLite and PostgreSQL via the :temp option to create_view

These are adapter-specific options, so add adapter tests for them.
do/postgres appears not to like the added spec, causing later
freezing, so skip that spec on do/postgres.
Make create_view with a dataset work with the pg_auto_parameterize extension

Automatic parameterization should be turned off, since the query is
not executed like a normal query.
Remove use of Object#extend from the eager_each plugin

Object#extend clears method caches, so its use should be avoided
if possible.  In eager_each's case, it's fairly easy to avoid
extending with the module at runtime by just checking for the
eager/eager_graph opts instead of hooking into the method calls.
Attempt to use nicer error messages on JDBC connection failures (Fixes #605, #606)

It looks like in some cases the e2 message contains more
accurate information than the e message, so default to using
that.  Also, don't bother to concatenate error messages if
they are the same.
Add spec for limit/offset in a subselect

The current offset emulation with row number does not handle
subselects, so this spec currently fails.
Remove row_number_column addition in the emulated offset code

Instead of having the row number column be selected, and trying
to filter it out in all of the adapters, add a selection around
the subquery so the row number column is not returned at all.

This greatly simplifies the code, fixes any issues with ambiguous
row number columns in nested queries, and should improve processing
speed for all fetches.  The slight negative is that it may
require a query to get the columns for queries with offsets, and
potentially multiple queries if there are subqueries with offsets.
That can be mitigated by using the columns_introspection extension.

This causes issues with the correlated subquery eager limit
strategy on Microsoft SQL Server, but as that supports window
functions, there is no reason to use correlated subqueries there
(and plenty of adapters don't support that strategy).

While here, fix columns to call naked, since the row_proc shouldn't
be called if you are just retrieving the columns.
Update jdbc/sqlserver adapter after removal of row number column handling
Mark paged_each as a dataset action method

This allows Model.paged_each to work.
Have #last and #paged_each for model datasets order by the model's primary key by default

I originally had planned to do this to #first as well, for
consistency, but it would have required extensive spec changes.
Also, such a consistency is not necessary.  The reason for doing
this for #last and #paged_each is that those methods require
orders, so having a default order by primary key allows them
to work without specifying an order explicitly.  #first already
works without specifying an order explicitly, so it doesn't need
a similar change.
Expand columns_introspection extension to handle subselects

If the query just selects * from a single subselect that doesn't
use a join, push the introspection to the subselect, since
the main query should use the same columns as the subselect.
Make Database#remove_cached_schema thread safe
Fix dataset integration test

The previous test wasn't wrong, but it didn't really test what
I wanted to test (a three-level from_self), because without
the from_self the last reverse_order.limit overwrote the previous
one.
Expand columns_introspection extension to consider cached schema values in the database
Speedup tinytds adapter fetch speed by up to 60%

This code uses the fact that TinyTds::Result#fields returns a
mutable array.  By mutating the members of the fields array before
calling each, we no longer need to manually create the hash, we
can have tiny_tds create the hashes in C using the symbol column
names provided by Sequel.
Don't introspect columns without explicit selects when CTEs are used

CTEs can change the which table is actually being referenced,
so you can no longer rely that a table identifier is representing
the a regular table.
Speedup mysql2 adapter with identifier output method fetch speed by up to 50%

This is a similar change as was made to the tinytds adapter, mutating the
fields of the result before calling each, and having the driver create
the hashes for us.