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.
Merge pull request #1706 from jtanx/gfc

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