image: Use imlib2's image cache
This makes imlib add images loaded from files to its image cache again. That way
we avoid loading the same image again and again (e.g. if you cycle through the
list layouts all the layout icons are loaded).
To not reintroduce FS#651 (fixed in
2dadce9b), we call
imlib_image_set_changes_on_disk(). This causes two stat() calls if the same file
is loaded again to check if the file's timestamps changed which is still less
expensive than loading the whole image again.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>