DEV: Validate models returned from ContentsManager methods.
DOC: Add docstring for validate_model.
DEV: Tweaks from PR feedback.

- Reformat expected keys for in `validate_model`.
- Require `'mimetype'` to be non-None only when the model being
  validated is a file.
- Add more information to the error when keys are unexpectedly non-None.
Merge pull request #7140 from quantopian/validate-contents

DEV: Validate models returned from ContentsManager methods.