[Android] Fixed that long press on text will crash in shared mode

The ActionMode will use Activity to inflate layout, which in
shared mode, it will fail due to incorret context to search
for resources.

Introduce XWalkActivity for Embedders who want to use Shared
mode to inherit for the Activity will contain SharedXWalkView.

Besides, some layout ids exist in both app and library context.
Add detection of whether the stack trace is from library or
app to try use the correct resource first.

BUG=https://crosswalk-project.org/jira/browse/XWALK-2712
Merge pull request #2511 from wang16/action_mode

[Android] Fixed that long press on text will crash in shared mode