vold: don't crash when formatting unformatted volume

When formatting unformatting volumes, fstype will be NULL causing
a crash in strcmp. Set it to "vfat" to avoid the crash.

Change-Id: I3876ea2a6d91e78f579537fd6ea3d030fb18ee7b

Conflicts:
	Volume.cpp
vold: Allow specifying the filesystem type when formatting

 * Optional parameter added to "volume format" to specify the filesystem
   type to use. If not specified, default is to auto-detect.
 * Add support for formatting NTFS.
 * Use mke2fs to format when not creating containers.

Change-Id: I2bc0f92d59adb9604b35a1f70febccfba68715d3
vold: Clean up warnings

 * Clean up all the dead code and get rid of all warnings

Change-Id: I8101b6314012a39e8e3a9b9b9aa8f4841b4c430d
Do not show disk errors if they are expected.

An error shows up during boot if vold disk has different majors.
On some devices this is expected and set in config, so do not
confuse users and skip the error (as it ain't one)
Bonus: Better log for duplicate state. It was useless...

Change-Id: Ibc047729432e2f6746a9439b828d1443951ade1f
Volume: Don't crap out when dealing with unformatted cards

And plug a memory leak when formatting them

Change-Id: I2ab58328d07a343a5ec9e1c4b58f8258f0c9133c
Add Flash-Friendly File System (f2fs) support.

Change-Id: If46bf7329a7453122a4379f9bc41cf9553426e74
vold: allow pre-configured device pairs to switch mountpoints

By setting persistent system properties
 persist.sys.vold.switchexternal=1
 persist.sys.vold.switchablepair=sdcard0,sdcard1 (for example)
two non-emulated extended storage devices can swap between primary
and secondary storage.

This commit is heavily inspired by Rick Fernie and Ricardo Cerqueira's
"vold: Allow pre-configured device pairs to switch mountpoints"
[http://review.cyanogenmod.org/12764] but adapted to CM's newer vold.

Change-Id: I2be5d4799c2d8f04a535096ac4c7619849f1f84a