rgw: fix up the use of tenant before it's available
A big problem that cropped up with the multi-tenancy as it
went in was that it used tenant to initialize bucket names
before tenant was actually available by parsing a token.
Thus, although multi-tenancy worked, accessing anything across
tenants was actually impossible. This patch fixes that oversight.
Unfortunately, a new method postauth_init() was needed for it.
We also fix small bugs:
- validate_tenant_name() used a proper-looking C++ but was
incorrect. We simply use C for now, which may be not as
pretty but is correct.
- We now make a distinction between empty tenant syntax that
means "the logged-in tenant" ("bucket") and the syntax
that means "the legacy compatibility tenant with no name
(":bucket").
- We make rgw_make_bucket_entry_name() more robust against
empty inputs. It's not used for work, but produces odd-looking
debugging logs.