rgw: cls_bucket_list_(un)ordered should clear results collection
Each call to cls_bucket_list_(un)ordered should have an empty
collection to populate with results. Rather than rely on the caller to
insure this, it's more reliable to have these functions do the clear.
Additionally in some cases, a reserve call was added to the collection
to pre-allocate the space needed for the expected number of
results. This will potentially result in fewer re-allocations plus
copies.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit
c52039a9e8a49f3a29e2d2ee80e50d7b1b441842)
Conflicts:
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.cc