Lock model cache manager access for thread safety
Since we can access to mModelCache by ModelCacheManager,
and also we can create new items (== change container itself)
Add a global mutex lock for cache manager API.
And also, add some comment why we use std::map for cache.
And also, do not open conditional wait object out of cache.
And also, increase reference count of model so we can run this function
more thread safety.
TODO : We MUST not access into model cache manager from worker thread.
(Since worker thread can Process even main thread shutdown.)
MUST be refactorize.
Change-Id: I81e95a5f5df8c16dbaf6b84b6ddd3cd4809121d0
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>