Build script to build web apps
1: Add common build script make_webapp.py for both android and tizen.
2: Add android build script android/android_build_app.py.

Scenario:
1: Find all the available web apps (Which contains manifest.json).
2: Init update all web apps.
3: Check whether build script exists, if no,
   hook the downloader download the specified version.
4: Loop all the apps.
5: Copy manifest.json to [WebApp]/src.
6: Build with build script.
7: Remove manifest.json.
8: Move the build result to out folder.

How to use:
Build all apps for both Tizen and Android
    python make_webapp.py
Build specified app
    python make_webapp.py --app=MemoryGame
Only build for Android
    python make_webapp.py --target=android
Update Web Apps and then build all of them
    python make_webapp.py -u

The build result will be under out directory.
Change MemoryGame/manifest.json:local_path to app/index.html
Currently, the game source is a submodule from 01.org,
and it contains some un-needed files under [src],
what crosswalk needed html related sources are all under [app].
It's hard to submodule only one folder which we needed,
And to make build script simple, current solution is:
Change our manifest.json to route local_path to app/index.html, to make build succeed
and the un-needed files will also be included.

For better solution need to be discussed and redesigned.
Merge pull request #18 from kurli/MemoryGame_manifest_fix

Change MemoryGame/manifest.json:local_path to app/index.html
Merge pull request #9 from kurli/master

    Build script to build web apps
Apply patch for submodules when patch needed
For some web apps, we just submodule from external repo,
and our changes sometimes hard to be merged on time, so patch is needed.

Patch file rules:
  1. Patch can be generated by "git format-patch [compared branch name]"
  2. Needed patch files should be located under [WebApp] folder
  3. [IMPORTANT] Patch name should be ordered by alphabetical,
     and will be patched orderly by patch script. (eg. 0001-xxx.patch 0002-yyy.patch)

Apply patch scenario:
  1. Check whether it's a git submodule, otherwise, skip below scenario
  2. Get sorted patch file list (Patches need to be orderly patched)
  3. Check whether patch files under WebApp folder, if none, skip below scenario
  4. Checkout the submodule to 'master' branch
  5. Remove 'auto_patch' branch which was created during previous build
  6. Create a new 'auto_patch' branch
  7. Apply all the patches
  8. Checkout to 'master' branch
'auto_patch' branch will be remained after build for further review.

BUG=#16
Merge pull request #19 from kurli/git_am

Apply patch for submodules when patch needed
Change the download url and fix some nits reported by pylint

The download url is changed. See https://download.01.org/crosswalk/releases/.
Besides, fix some coding style issues reported by pylint.
Merge pull request #23 from yongsheng/downloadurl

Change the download url and fix some nits reported by pylint
Fix the flag '--version' not working when the folder 'xwalk_app_template' exists
The script won't download the build tool when the folder 'xwalk_app_template' exists.
After this fix, we can switch between versions more easily.

Solution:
1: If '--version' specified for make_webapp.py
   1) If we have previously downloaded the version,
      Replace xwalk_app_template to the version
   2) If not downloaded, download it
2: If no '--version' specified, use previous one
BUG=#24
Merge pull request #25 from kurli/tools_version_control

Fix the flag '--version' not working when the folder 'xwalk_app_template' exists
Submodule track specified commit id
When we run git submodule update --init
The master branch in submodule will always be the latest version.
We want to track specified commit of submodule, because the submodule
will be updated, and will not work on our crosswalk sometimes, such as
MemoryGame from 01.org
Solution:
1: Remove '-u' flag, to avoid user update web apps themself.
2: Create a new branch named 'for_crosswalk', which will track specified commit id
3: Revert MemoryGame to commit:Moved app into app/.

BUG=https://crosswalk-project.org/jira/browse/XWALK-103
Merge pull request #26 from kurli/submodule_track_commit_id

Submodule track specified commit id