Move new bucket class into existing bucket module

The existing bucket (that handles querying and storing) will not be
factored out just yet. With this story we are just introducing
bucket configuration being stored in the database.
Refactor BucketConfig to be a namedtuple

Less code, more like Query.