Gallery2: Fix crash for unsupported format on mute operation

Mpeg4 Writer does not support formats other than mp4/h264/h263.
Need to check in app for unsupported format before starting mute
operation.
Fix is to add condition in app to check for unsupported format and
display toast message.

Change-Id: I6c3fda284a3eb5e4483c6ec268a1f2c4d79d6773
Gallery2: Ensure background cleanup complete on back key

Block back key event till the image gets displayed
when user presses edit option/icon.
This'll allow the background process to cleanup memory.
Added null check and bitmap recycle to avoid crash.

Change-Id: I54b3ae429e193f28ba66e16e10bf0cf511af39d6

Conflicts:
	src/com/android/gallery3d/filtershow/pipeline/UpdatePreviewTask.java
Gallery2: Fix editor

Fix out-of-order operations while setting up the editor

The buffer's producer is created by the cache pipeline generation,
so verifying that it isn't null before calling compute() is wrong.

This breaks a few devices, and should actually break them all, so
fix it; only check if getProducer() is valid after running setProducer()

Change-Id: Ief8843961b622066c4fa1cf41ca5c5322e177250
Gallery2: add wmv, mpgts, mkv, asf mimetypes

Add extra mimetypes so they can be used for playback from Music app

Change-Id: I5409bfdeda5bcc0af99ecede6cf999c93c51bb88
Gallery2: Add divx, avi mimetypes

Add extra mimetypes so they can be used for streaming

Change-Id: Ic69149ccee7025db789bcfe21467f2fc478a1b0c
Gallery2: Avoid crash during muting video

See https://gerrit.omnirom.org/#/c/6673/

Change-Id: I787e12554836fa00f8a735d8856dac4a3da2decc
Gallery2: delete output file if mute or trim failed

Change-Id: I6925187b2e68f4041513cb26be4ad444cfed3720