cls_rgw, rgw: pending_log can hold multiple entries per epoch

This is needed, so that we can later replay operations, using the epoch
for idempotency.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
cls_rgw: link, unlink olh ops can get epoch

If epoch is specified, we need to handle updates differently, only
update the olh itself if passed epoch is newer than the olh current
epoch. Otherwise this is a replay of an older operation that doesn't
affect the olh (or the "current" property).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw, cls_rgw: provide optional version id, versioned epoch to olh ops

Let system users specify optional params: rgwx-version-id,
rgwx-versioned-epoch. These will apply to object modification operations
(put object, copy object, delete object), and provide the mechanism that
the sync agent will use to apply remote object changes.
Copy operation hasn't been done yet.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: cleaup RGWRados::copy_obj()

separate into multiple methods.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: propagate version id when putting obj

A system user can set the rgwx-version-id http param, and it's now sent
to the objclass.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: copy obj does versioning too

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
rgw: move versioning handling to Object::Write::write_meta()

Instead of having to call set_olh() after calling write_meta(), do it
inside that method. This way we (mostly) don't need to care about
versioning outside of it. This required moving bucket info around
instead of just passing the bucket owner.

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