run e2fsck -f selectively with mount retry

- Do not use -f if it was cleanly shutdown.
- For unclean shutdown or other operation failures like
  mount, tune2fs failure, run full check.
- Still old image will run full check once in 5 reboots
  while new image will not run full check unless something
  fails.
- Add retry for final mount. If mount fails once, run full fsck
  once and try again.

bug: 32246772
bug: 35366616
Test: many reboots

(cherry picked from commit 40db04d640f42afb544ebc4a4789bd38ddabedfb)

Change-Id: If312d91e09aca0648dd926e26a3d1e5f7ddedb46
1 file changed