Avoid extra check for clean object

We needn't to check clean object via buffer state, skip the clean object.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
(cherry picked from commit f51e33bd9c5a8e1cfc7065b30785696dc45918bc)
osd/OSDMap: make get_features() take an entity type

Make the helper that returns what features are required of the OSDMap take
an entity type argument, as the required features may vary between
components in the cluster.

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 250677c965365edf3ecd24ef73700fc6d992ea42)
osd/OSDMap: do not require ERASURE_CODE feature of clients

Just because an EC pool exists in the cluster does not mean tha tthe client
has to support the feature:

1) The way client IO is initiated is no different for EC pools than for
   replicated pools.
2) People may add an EC pool to an existing cluster with old clients and
   locking those old clients out is very rude when they are not using the
   new pool.
3) The only direct client user of EC pools right now is rgw, and the new
   versions already need to support various other features like CRUSH_V2
   in order to work.  These features are present in new kernels.

Fixes: #8556
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 3fe1699f9620280d0070cfe6f01cfeb2332e7470)