[MATLAB] minor changes in configure related to mex and mexext

- find them also in the path
- if mextext is not found, do not configure matlab support (in the previous
version, we still tried to run it, resulting in a confusing error message)
[MATLAB] fixed autodoc problem for static methods

the autodoc was emitted at the start of the .m file for the class, as opposed to
at the function definition.