CMA importer refactor plus fixes

Extracts things into classes, adds some tests.

Additionally:
- Expect existing PDF links to either be URLs or paths when looking up extracted attachment titles.
- Permit mandatory fields to be missing but be noisy about it.