Speed up using plain strings, numbers, true, false, and nil in json columns if underlying json library supports them (Fixes #834)

Since Sequel rescues the InvalidValue exception and will try
reparsing inside an array, it doesn't make sense to raise an
exception if the initial parse returns a valid object.

Note that the default ruby json library implements RFC 4627 and
only allows object or arrays values as root values.  However,
libraries such as Oj implement RFC 7159 that allows strings,
numbers, true, false, and null as root values.  On libraries
that implement RFC 7159, this avoids raising a needless
exception, which should speed up retrieval significantly.

Note that there are no wrapper classes for json strings, numbers,
true, false, and null, so such values do not currently roundtrip.
Add modification_detection plugin, for automatic detection of in-place column value modifications

This is a simple if fairly slow way to reliably detect in-place
column value modifications.  Well, it's reliable if the objects
themselves implement #hash correctly, but if they don't then
those objects should be fixed.

ActiveRecord is going to be doing something similar in the future
by default.  I don't think it's a good idea to force a slowdown
on all users just because some users may modify values in
place, so it will remain a plugin in Sequel.  Users who care
about performance should continue using the existing
modified!(:column) method to manually mark column values as
changed when changing them in-place.
Fix some rdoc text in the pg_inet extension
Add link to modification_detection plugin to website
Add pg_enum extension, for dealing with PostgreSQL enums

This is simpler than most of the other pg_* extensions, since
PostgreSQL returns enums as string values by default.  The
most useful part of this is returning the possible enum values
in the schema hash, since otherwise you have to query the
system catalogs to get the information.
Fix regression in timestamps and table inheritance plugin where column values would not be saved if validation is skipped (Fixes #839)

This adds a _before_validation private hook that is called both
before valid? and in save before validation is done, even if
validation is skipped.  This ensures the hook is always run
during save, and always run before validation.  It is useful
whenever plugin code needs to set column values on the object
that it might be validating, but must be set before save even
if not validating.

This regression occurred in 4.11.0, and since that isn't the
latest release, this will not be backported and a new gem
will not be released, per Sequel's usual policy.
Make composition and serialization plugins support validations on underlying columns

This changes the composition and serialization plugins to use the
recently added _before_validation hook, so that validations on
the underlying columns are allowed.  This should work better
when the auto_validations plugin is used and there are NOT NULL
constraints on the underlying columns.
Update documentation for pg_* extensions (Fixes #838)
Add appropriate spec guards for pg_enum extension's add_enum_value

PostgreSQL didn't support adding values to enums until 9.1, and
didn't support the IF NOT EXISTS syntax until 9.3.
Fix recursive mutex locking issue on JRuby when using Sequel::Model(dataset) (Fixes #841)

There's already a model spec for this, which does fail when run
in isolation.  For some reason it passes when you run the model
specs and the core specs together (which the default spec task
does).
Use all_tab_cols instead of user_tab_cols for defaults parsing in oracle adapter

user_tab_cols only shows tables the user owns, while all_tab_cols
shows all tables the user has access to.
Use all_tables and all_views for Database#tables and #views on Oracle

This works better for users with limited rights.  Similar to other
databases, we try to hide the system tables.  In the case of Oracle,
that's not all that simple to do, as there are a lot of system users,
so we may want to expand the IGNORE_OWNERS constant in the future.
Make rake default task run plugin specs as well as core/model specs

People that don't read the testing guide or look at the output of
rake --tasks might not know that you need to run spec_plugin for
the extension and plugin specs.  This should make it more likely
that new users actually test extension/plugin changes before
submitting pull requests for them.
Update rdoc for PGRange#empty?
Refactor fractional timestamp literalization

Add Dataset#timestamp_precision private method holding the number
of decimal digits of precision supported by timestamps in the
database.  Use this to automatically handle the formatting of
fractional seconds, avoiding the need to override
format_timestamp_usec in the mssql and sqlanywhere adapters.

While here, cleanup the specs so they don't depend on the current
date/time values, which simplifies them significantly.
Add round_timestamps extension for automatically rounding timestamp values to database precision before literalizing

This can fix issues where timestamps are rounded down instead
of roundest nearest if the timestamp value is more precise than
the database supports.

I choose to add this as an extension as it requires creating an
extra object every time you literalize, and few people need this
behavior.
Use associated model's existing selection for join associations if it consists solely of explicitly quailfied columns

For associations that don't require joins, the associated class's
dataset selection is used by default if the :select option is not
specified.  In most cases that is SELECT * since that is Sequel's
default.

That is not true for many_to_many and other associations
that don't require joins. Those have always used associated_table.*,
so that they do not automatically pick up columns in the join
table and so that they don't have any issues with columns becoming
ambiguous.

However, if the associated class's dataset consists of all explicitly
qualified columns, then it will not automatically pick up columns
in the join table, and there won't be any issues with columns
becoming ambiguous.  In that case, there is no reason to ignore the
model's default selection.
Add column_select plugin, for using explicit column selections in model datasets

This is similar to the table_select plugin, but instead of using
table.*, it uses table.column1, table.column2, etc..  This makes
it so that it you add a column to the table while the application
is running, values for the column will not show up automatically
in the model instance values.
Use qualified columns in the lazy_attributes plugin

With the recent associations change, this means that setting
up a many_to_many association to a model using lazy_attributes
will lazy load such attributes instead of eager loading them.
Add dataset_source_alias extension, for automatically aliasing datasets to their first source

I think this creates more usable aliases.  If not for backwards
compatibility, this would probably be the default behavior.

This should also help workaround issues when the column_aliases
plugin is used if you also use the model as an argument to
join_table, since then the model will use the dataset instead of
the table name when joining, which can change the alias used.