factory reset: restore ext4 policy on /data/cache

If ext4 policy is not restored, system won't boot properly
after a factory reset.

When /data is formatted by the user, we need to make sure we
do not create the /data/cache directory so that Android can
create it with the new policy for /data.

This also removes extraneous umount calls, and places them
in the specific wipe function for each filesystem.

Change-Id: I71ff39d8660fbf4aa6fe8a8309e291166359da72
diff --git a/Android.mk b/Android.mk
index 26a5227..81a2f5d 100755
--- a/Android.mk
+++ b/Android.mk
@@ -177,7 +177,11 @@
 ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
     ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0)
         LOCAL_CFLAGS += -DUSE_EXT4
-        LOCAL_C_INCLUDES += system/extras/ext4_utils
+    endif
+    ifeq ($(shell test $(PLATFORM_SDK_VERSION) -le 28; echo $$?),0)
+        LOCAL_C_INCLUDES += system/extras/ext4_utils \
+            system/extras/ext4_utils/include \
+            bootable/recovery/crypto/ext4crypt
         LOCAL_SHARED_LIBRARIES += libext4_utils
         ifneq ($(wildcard external/lz4/Android.mk),)
             #LOCAL_STATIC_LIBRARIES += liblz4
@@ -206,8 +210,6 @@
     LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_TWRP_LIB)
 endif
 
-LOCAL_C_INCLUDES += system/extras/ext4_utils
-
 tw_git_revision := $(shell git -C $(LOCAL_PATH) rev-parse --short=8 HEAD 2>/dev/null)
 ifeq ($(shell git -C $(LOCAL_PATH) diff --quiet; echo $$?),1)
     tw_git_revision := $(tw_git_revision)-dirty