rgw: calc md5 and compare if user provided appropriate header

Fixes: #8436
Backport: firefly

This was broken in 01235f4365d00771ac4f8c1ce33f1bccdea77d3c. The fix
resurrects and old check that was dropped.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>