Octave: more robust configuration

- do not rely on --eval argument to find mkoctfile, instead assume it
  is in the same directory as octave itself (which it always should be)
- check Octave options to make sure they are supported, including
  --no-window-system to prevent warnings if building without an X server
- disable Octave if any vital tests fail
Octave: fixups to previous configuration patch

- remove unneeded test -n "$OCTAVE"
- do not rely on Octave returning non-zero status for unrecognised option;
  search first line of output for 'unrecognized' instead
Correction for detecting invalid Octave options