add bigserial pk support

This is essentially a backport of the bigserial support I put in master.  It's safe to use our app against this after it's merged, but I want to move our pk sequence stuff out before we update the app to point at this.
Isn't this PG specific?