fs_mgr.c: fix i++ error and optimize code

Change-Id: I4d7c9846143ec5b9f76af42c7ee4d5a7c2a3fd6d
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
fs_mgr: Add f2fs filesystem check

Change-Id: I7d410f89c1adaaf2fc68aa510ab1f3e6a9783657
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
fs_mgr: support multiple file systems on a mount point

This is a combination of 3 commits pulled from Motorola's github for
allowing f2_mgr to have "fallback" handling for a mount point.  This
is most useful in the case of f2fs where some variants may be formatted
ext4 and some f2fs.  These device can now be supported in 1 fstab.

Example snippet of fstab.* for userdata mount point:
/dev/block/platform/msm_sdcc.1/by-name/userdata    /data        ext4    rw,discard,nosuid,nodev,noatime,nodiratime,noauto_da_alloc,nobarrier    wait,check,encryptable=footer
/dev/block/platform/msm_sdcc.1/by-name/userdata    /data        f2fs    rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr                 wait,encryptable=footer

Changes in logic ignore 1st failure as an automatic assumption of encryption.
Instead fstab is checked for another line describing mount point (2 retries)
Once all retries fail, encryption is assumed.

NOTE: Some logic was removed from the original sources: If userdata failed to mount
and was not encrypted a format of the filesystem was forced as a way of recovering
the device.  Most custom ROM users have access to recovery where they can decide
what to do in this case.

REFERENCE COMMITS:

IKJBMR2-6556: don't assume that mount failure implies encryption
https://github.com/MotorolaMobilityLLC/system-core/commit/f3c3b19f93967952e1811cad82d5a0ef5bbfcad3

fs_mgr: support multiple file systems on a mount point
https://github.com/MotorolaMobilityLLC/system-core/commit/84ea2cd252515384a254b52dfd84721b885707ab

fs_mgr: rename "recover_userdata" relic to join fs_mgr
https://github.com/MotorolaMobilityLLC/system-core/commit/a4ef7c2c321b71496a13066af94b4b1cb557dd28

Change-Id: I682580d2a756bff4dba75760e0f117d95613e790
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>