Fixes mapbox/mapbox-ios-sdk/#337
fixes #338: properly VACUUM after flushing cache