Gallery2: fix cropview shows abnormal if lock and rotate screen

The canvas value will effect the screenbounds value.
When screen is locked, the screen orientation will be force
changed to portrait but the screenbounds will still use
landscape value.

To fix this issue, if found screenbounds changed, we will make
dirty true to update the view.

CRs-Fixed: 557210

Change-Id: Ia84581d122da76f084117dfd0a195ce2784e18c9
Gallery2: fix can not add gallery widget to home screen

When selected to add a cropped picture to home screen,
the binder transaction failed because it was too large,
add widget failed.

We reduce the allowed maximum bitmap size in intent,
to make sure that binder size will not greater than 1M.

CRs-Fixed: 528927

Change-Id: Id63c8503dead66ab18531a78b0b4206d1fd30d07
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