Change to ZIP/XML import logic

Fixes bug #28. We no longer check the MIME type of ZIP content
and instead try to expand it and succeed if a valid ZIP entry is
found. Some changes have been made to the API to accommodate this
safely.
Ready for 1.0-M4a.

(This cherry-picks commit 99b5db5 from the master branch, which
rewrote the CP-handling code to make it less fussy.)