Revert "Simplify version extraction"

Unfortunately Emacs prints all sorts of warnings and messages to
standard output/error when starting its Lisp machinery, and these is no
easy way of telling it “just print this and nothing else, please”.  All
this may break our version parsing, thus we go back to extracting the
version from --version, which exits before the Lisp machinery starts and
thus doesn't print anything else.

This reverts commit 2bc7b513256578d6503caffa84b4cdc9680a468d.