Use latexmk's success_cmd/failure_cmd instead of checking return codes

This PR replaces the checking of latexmk error codes with uses of latexmk's `$success_cmd` and `$failure_cmd`. This has the advantage that `$success_cmd`/`$failure_cmd` are called during latexmk's continuous preview, not just when the latexmk process finishes. This means that error reporting can be enabled in continuous preview mode.