Register the calculate_md5 event handler for put-bucket-lifecycle and put-bucket-cors operations.  Add tests for both.  Fixes https://github.com/aws/aws-cli/issues/229.