Add a page loading indicator to the page number input

This PR contains a suggested implementation of the ideas in #3990.
With this patch, a loading icon will be placed in the page number input field, but only when the currently visible page is actually loading.

Feedback welcome!

Fixes #3990.