Edit book: Add various validity checks for OPF files.

Check for incorrect idrefs, missing required sections, non-linear items
in the spine.
...