Fix Back and Forward navigation
https://bugs.kde.org/show_bug.cgi?id=414701
This seems to behave in the same way as okular did before my patch, so the regression is fixed.
It doesn't seem to behave correctly when scrolling with the mouse, and it didn't do that even before my patch, so I think that's another bug, I'm not addressing that for now.