fix(wsh): Use errorLogException() to report errors (refs #4938)
Merge pull request #1298 from eguaj/3.2-A4938

fix(wsh): Use errorLogException() to report errors (closes #4938)
feat(FDLGEN): Add controls on FDLGEN class generation (refs #4930)

Prevents generating an incorrect class file when the parent family is not
found due to inconsistencies between the docread and doc tables.

Also:
- Check for PHP syntax errors before generating FDLGEN's files.
- FDLGEN's files were generated with an incorrect filesystem right that
  allowed local users to alter their's contents.
- Add checks for missing/spurious documents between the docread and doc
  tables in the supervisor page.
- Add checks for inconsistencies in families' logical names in the
  supervisor page.