evas cache: refactor internal logic.
Summary:
Adding cache targets in other modules are inproper.
This can't be managed by cache module inside.
One representive scenario is,
when preload cancel is triggered, preload canceling sequence
can't be performed properly because cache targets implicitly were
increased by backend modules.
And then, Cache itself couldn't get notified it.
see this condition.
if ((!ie->targets) && (ie->preload) && (!ie->flags.pending))
in _evas_cache_image_entry_preload_remove()
Consequently, I move preloaded callbacks to sync with adding cache targets,
not to add by backed engines themselves.
This will bring Cache to manage cache targets properly.
Reviewers: #committers, raster
Subscribers: cedric, #reviewers, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6912
Change-Id: I85312f2c16f594260ee3aa7895c283a3de782eb3
Signed-Off-By: Hermet Park <chuneon.park@samsung.com>