function: Fix some baaad integer signedness issues
function: Fix some baaad integer signedness issues

As these variables indicate -1 for "non-existant", they can't be
unsigned.

https://bugzilla.gnome.org/show_bug.cgi?id=697816

mtwebster/cjs,djdeath/gjs,pixunil/cjs,endlessm/gjs,djdeath/gjs,djdeath/gjs,djdeath/gjs,djdeath/gjs,mtwebster/cjs,mtwebster/cjs,mtwebster/cjs,pixunil/cjs,pixunil/cjs,endlessm/gjs,endlessm/gjs,pixunil/cjs,mtwebster/cjs,pixunil/cjs,endlessm/gjs,endlessm/gjs