gfilechooser.c: Really fix the realloc procedure for gfc->history

gfc->hpos is the position of the current entry; new entry goes in
gfc->hpos+1, so there must be enough space for gfc->hpos+1 entries.

Related issues: #1640, #1644