rgw: bi log list/trim can get specific bucket shard

bucket shard can be specified on the bucket instance param. It can be
added like this: <bucket-instance>[:shard-id]

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: use new BucketShard structure for index manipulation calls

Instead of recalculating the hash every call, do it once, and pass this
structure around. Also, will be used for logging changes into the data
log.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: data changes log, log info by bucket shard id

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: improve bucket sharding hashing

Amplify small source changes.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: decode the req_state bucket instance id if needed

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: bucket_index_shard_hash_type fixes

add initializations, json encode /decode.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
cls_rgw: list bi log should not return marker entry

The marker should be served as a lower bound, but should not be
returned.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: bucket replica log, handle shard ids

bucket replica log can now save entries by the specified shard id

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: modify bucket instance shard marker ids

Instead of having the markers prefixed by the oids, use the bucket
instance id.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
cls_rgw: clean up CLSRGWConcurrentIO

Class is no longer a template, and keeps a map of oids by shard_id. Call
issue_op() using both shard_id and oids. Shard id is used for mapping
the results in the derived classes.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw, cls_rgw: keep shard ids with oids

Instead of just having the list of oids, keep the shard ids together, so
that we can know on which shard the operation happened.
Bucket markers are just using the shard numeric id, instead of the
bucket instance shard id. This makes it easier to parse the markers
appropriately.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
cls_rgw: extend shards marker api

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: write multi shard markers on replica_log appropriately

When getting a list of shard_id#marker, iterate through the shards and
write each as needed.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: pass num shards on bucket initialization

Need to pass the actual num shards that are going to be used for this
specific bucket. Bucket may be created by applying metadata from
different zone, so num shards might be different.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>