Add a getter for the mode

This is better than directly poking at the current notebook
page, as we currently do in a few places.
GsShellUpdates: Use gs_shell_get_mode

We use it to ensure that we are only updating header content
if we are still the current page. In order to do this, we need
to keep a reference to the GsShell in GsShellUpdates.
GsShellDetails: Use gs_shell_get_mode

We use it to ensure that we are only updating header content
if we are still the current page. In order to do this, we need
to keep a reference to the GsShell in GsShellDetails.