fix soft reboot while formatting

While formatting it's possible to cause a framework crash if the format
opperation is not successful. The 'getCode' function in
NativeDaemonConnectorException can cause a NullPointerException, since
'mEvent' can be null. If an exception is thrown while formatting the
thread will try to create a Toast to notify the user of failure. This
causes a RuntimeException because a Toast cannot be shown from a
background thread. Make sure 'getCode' will not throw a
NullPointerException and also create a handler so that the thread can
send a message in order to create a Toast.

Change-Id: I04c250c46509ae38b0d0a5bfc0e950efbad58305
Conflicts:
	core/java/com/android/internal/os/storage/ExternalStorageFormatter.java
Fixed broken syntax in ExternalStorageFormatter and NativeDaemonConnectorException

Added missing underscores and incorrect case in variable names
Fixes errors created by https://gerrit.paranoidandroid.co/4004

Change-Id: I9571a08e0fa482135b5e3c6ec30af9c9dbf2edd0