3113: API server assigns task qsequence from a PostgreSQL sequence.
We always wanted monotonically increasing qsequence values. This
implements that.
Because sequences are specific to PostgreSQL, it can't be expressed in
schema.rb. This commit switches our Rails configuration to dump the
database schema in SQL to capture that.
PostgreSQL supports assigning a column's default value from a
sequence, but this doesn't play well with ActiveRecord. Without more
information, it always tries to assign NULL as the column value,
rather than leaving it unassigned to get the default. We have to get
the value from inside the model.