list store: Fix overflow issues

Check for over- and underflow when manipulating positions.

This makes the sequence
  g_list_model_get_item (store, 0);
  g_list_model_get_item (store, -1u);
return NULL for the second call, as it should.

Closes: #1639
10 jobs for <span class="ref-name">bad-liststore</span> in 14 minutes and 20 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #182021
cross-android_api21_arm64

00:01:00

passed #182022
cross-android_api28_arm64

00:01:15

passed #182023
cross-mingw64

00:01:29

passed #182020
fedora-autotools-x86_64

00:05:40

passed #182019
fedora-x86_64

00:03:57

passed #182044
freebsd-11
freebsd-11-x86_64

00:04:05

passed #182024
win32
msys2-mingw32

00:08:15

passed #182025
win32
vs2017-x64

00:08:04

failed #182026
freebsd-11
freebsd-11-x86_64

00:03:59

 
  Coverage
passed #182027
coverage

00:01:59

75.4%