FindMatlab: refactor: use registry query instead of execute_process

On Windows,
instead of executing "reg query" it's much simpler and more robust
to use cmake's built in registry query.

Remove unused variables. Significantly reduces amount of code in
function.
1 file changed