Fixes Access Violation err, multiple sharing violations.

- Fixes Access Violation in collation delegate callbacks.
- Attachments now get disposed in API tests.
- Fixes SHA1 digest computation.