rgw: remove use of s->bucket_cors

Some old code still tried to use s->bucket_cors, which was
abandoned in a cleanup work.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: OPTIONS request doesn't need to read object info

This is a bucket-only operation, so we shouldn't look at the
object. Object may not exist and we might respond with Not
Exists response which is not what we want.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add a generic CORS response handling

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: tie CORS header response to all relevant operations

Have the CORS responses on all relevant operations. Also add headers
on failure cases.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: don't handle CORS if rule not found (is NULL)

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix CORS rule check

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: add COPY method to be handled by CORS

Was missing this http method.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix certain return status cases in CORS

Change return values in certain cases, reorder
checks, etc.

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