MDL-44822 assignfeedback_editpdf: Stop test generation in is_enabled()

This change also moves one of the checks in test_gs_path. If
generateimage is false, there's no need to stat for the fixture file.
Merge branch 'MDL-44822_26' of git://github.com/aolley/moodle into MOODLE_26_STABLE
MDL-44583 Assign: performance fixes