When pressing and holding F5, Okular would reload the current
document multiple times and eventually get stuck with no document
showing and the "Reloading the document..." message reappearing every
second in an infinite loop. On exit, Okular then would sometimes
segfault, although often in different lines of code.
These issues can be avoided by only allowing one reload progressing at
any time. Any further reload requests are discarded.
Note: The "Reload" menu entry and shortcut are already disabled while
fetching the document (most noticable when using a slow network link).
The new lock protects against *overlapping* reload requests coming in
after fetching completes but before rendering finishes.
Thanks to @aacid for finding the fix, this merely improves the
implementation by using RAII instead of a non-dry bool.