Gallery2: avoid the crash of gallery during trimming video

- Google only provides the lib of mp4 parser to support
  the video-trim feature. But some files would fail to
  trim and cause the gallery crash
- catch the IllegalStateException to avoid the crash of gallery

Change-Id: Iadda7a42d4d694c102d50d2c52a93979ba2907a7
CRs-Fixed: 523986
jni: fix C99 inline linking

Clang builds C code according to the C99 standard,
which provides different semantics for the inline
keyword than GCC's default behavior. This is the
correct behavior without any gnu extensions.

See here:
http://clang.llvm.org/compatibility.html#inline

Change-Id: I831a5189e027a2f0cb3c7d9cda56bd3701502863