Use a hash table to store current sequence values.

This speeds up nextval() and currval(), when you touch a lot of different
sequences in the same backend.

David Rowley