Move some of the logic from egl_cache_t into FileBlobCache

HWUI is using BlobCache to implement SkSL shader cache very
similar to egl_cache_t. Create a new class FileBlobCache,
that is used by both egl_cache_t and HWUI. FileBlobCache adds
the logic to save and load the BlobCache from a memory mapped
file.

Test: Built and ran Android. Verified that EGL cache still works
Test: for gmail and calc apps.
Bug: 66740665
Change-Id: Ia4d194963d039a60244f3bc76108844418adc99d
diff --git a/opengl/libs/EGL/BlobCache.cpp b/opengl/libs/EGL/BlobCache.cpp
index 0624b60..b3752f5 100644
--- a/opengl/libs/EGL/BlobCache.cpp
+++ b/opengl/libs/EGL/BlobCache.cpp
@@ -37,9 +37,9 @@
 static const uint32_t blobCacheDeviceVersion = 1;
 
 BlobCache::BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize):
+        mMaxTotalSize(maxTotalSize),
         mMaxKeySize(maxKeySize),
         mMaxValueSize(maxValueSize),
-        mMaxTotalSize(maxTotalSize),
         mTotalSize(0) {
     int64_t now = std::chrono::steady_clock::now().time_since_epoch().count();
 #ifdef _WIN32