Gallery2: Fix force close when deletes about 5000 pictures.

According to the log analysis, it's the NullPointerException
and ArrayIndexOutOfBoundsException which will cause application
crashes.

The root cause is multiple thread will call the method
getMediaItem in LocalMergeAlbum. To avoid multiple thread mess,
add lock to keep safe.

CRs-Fixed: 545575

Change-Id: Iaadbb638cfb3f15193f5fcb7d4027ddd5f881201
Merge "Gallery2: Fix force close when deletes about 5000 pictures." into du44