[Android] Fixed calling extensionManager's onPause() and onResume() at wrong places

Call extensionManager's activity life cycle related codes in
onActivityStateChange. For now its onPause() is called with
ActivityState.STOPPED and onResume() is called with
ActivityState.STARTED, which are wrong.
Merge pull request #2373 from jondong/viewInternal

[Android] XWalkViewInternal refactor