Re-org the cacheCache

 - Add the related functions of the cacheCache as its member function.
 - Format the coding style
 - Move the code compact and align
Make the Giri runtime thread safe

We simply use the pthread_mutex_t variable and lock/unlock it before
every critical section. This is used for BBStack, FNStack and the
entryCache.