Do data/media checks first in format_device()

Wait to define a Volume variable until data/media checks are done
in case the Volume definition is unnecessary.

Change-Id: I6912b1b2a473ea8737ea3e415e9a0172bb35eff1
(cherry picked from commit dd812777f0bbb7075da8c3da6a18612fa90e100e)
Bump recovery to 6.0.4.6

Change-Id: Id2b373e5a356e7eaa8694e5d0300dff860762061
Define paths for recovery settings files in a separate header

Also, use get_primary_storage_path() to define the locations of .no_confirm,
.many_confirm, and .hidenandroidprogress instead of hard-coding /sdcard/.

Change-Id: I50442a226af1d102786c833c0b53c25bf63c67a6
(cherry picked from commit bd0fe453f6ca242f0ed868b4c0934af29d499bba)