Previously if a ContainerBroker was constructed with
db_file=<hash>_shard.db then the broker would be in state 'SHARDED'
regardless of the presence of a <hash>.db file or not.
This seems like a bad thing, and manifests as a bug when we pass a
sharding container's db_file to the _replicate_object method. The
db_file is <hash>_shard.db (because the container is sharding). The
_replicate_object method uses this to construct a broker instance
which erroneously takes on state sharded.
If _replicate_object ends up using rsync then in _rsync_db it calls
broker.get_brokers() in order to build a list of db files to be
rsync'd, but get_brokers() only returns one broker (for the shard db)
because the broker thinks it is in state sharded. Consequently only
the shard db is rsync'd whereas both dbs should be rsync'd.
This patch decouples the sharding state from the db file passed
to the broker __init__.
Change-Id: Id63d967277ec1634008cc9ce13cefd731836e02c