import partial giblib source into feh, do not link with giblib
strip unneded parts from giblib, part 1

Not all functions were examined yet. Also TODO:
* check strdup / malloc calls (some are apparently unchecked in giblib),
  maybe use estrdup / emalloc for those
* Check includes and update dependency list if needed