rgw: calc md5 and compare if user provided appropriate header

Fixes: #8436
Backport: firefly

This was broken in 5cc5686039a882ad345681133c9c5a4a2c2fd86b. The fix
resurrects and old check that was dropped.

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