Gallery2: catch OOM error when crop big-size picture

An OOM error happened when set big size of picture as wallpaper

We catch the OOM error, and if fail to crop the picture, we
show a toast.

CRs-Fixed: 522476

Change-Id: Ia9d7f41ca768c9183b26051fb08c9f823fec0074
Gallery2: The menu bar will not flicker.

When select/unselect items,the operation of menu bar is set
visible or invisible repeatly which cause the menu bar flicker.

Add a condition to judge whether the menu bar should invisible at the
beginning. And make the Share operation invisible only when the num of
selection picture is over 300.

CRs-Fixed: 567580

Change-Id: I58c724f7426a33f8b94bac174fc4d512a7aa6c49