Fix signature when both `Date` and `x-amz-date` headers are present

When both headers are present, the `Date` header should be ignored and
the corresponding line in the signature should be empty. Also add some unittests.