Add an automatic "master tex" finder

When asked to compile a LaTeX file the package will now search the current
directory for a "master tex" file. This is helpful in case the LaTeX document
is split in several files since it allows compilation from any LaTeX file in
the project. The functionality is implemented using both a heuristic search
and the recently implemented `MagicCommentParser` class.
merged with upstream master
Merge branch 'graph-based' into openPdf
Fixed method name.