Add ARDrone pilot extension.
Merge pull request #16 from legendlee1314/ardrone_pilot_new

Add ARDrone pilot extension.
[ARDrone] Workaround for a new issue from gyp

Use distinct string to avoid conflict in gyp cache.

Details of the issue:
http://code.google.com/p/gyp/issues/detail?id=112
Merge pull request #17 from deqing/mess

[ARDrone] Workaround for a new issue from gyp
Init ARDrone video extension
Add ARDrone video test case
Add play()/stop() prototype
Add ability to get video stream.

Current status:
===========
  Extension with idl interface (done)
  Example (done, need update time to time)
  Extension : Able to compile/pack, need verify whether can save to test.h264 in cacheDir()

Plan:
===========
  1. Use mOption.latency() to generate seperate .h264
  2. Import mp4parser and mutex the .h264 file, and save as .mp4 in cache (the hardest one)
  3. Send "newvideoready" event when .mp4 file is ready

Command to build:
===========
gyp --depth=. all.gyp && \
ninja -C out/Default/ && make_apk.py \
--package=org.xwalk.extensions.ardrone \
--extensions="./out/Default/gen/ardrone_video/" --arch=x86 \
--manifest="./examples/ardrone_video/manifest.json" && \
adb install -r Ardrone_0.0.0.1_x86.apk

How to remote debugging:
===========
1. Apply
https://github.com/halton/crosswalk/commit/89a0d71b0094fe0c8f6bd63c092ae384504f4998
in src/xwalk
2. Rebuild xwalk_builder target
3. Pack app with make_apk.py under out/Debug/out/Debug/xwalk_app_template
4. Start app on mobile
5. Start chrome://inspect on your host PC
Able to generate two 1s videos.
Import mp4parser to use
Able to mux h264 to mp4.

But fail on second duration, we guess it is because we split on non
I-Frame packet. So we'll try to segment the P264 stream with I-Frames
instead of duration.
Export some structure to window object
Use 192.168.1.103 as server
Use 192.168.1.103 as server
Able to generate h264 by IDR-Frame and mux into mp4 file

Next: Fix why newvideoready is not responsed.
Able to play videos

Next: the video is too short, need slow down.
Now the video play well ~10 fps

Some minor issues:
* Ocationally get black screen
* Some times core dump when mux

Next:
* Move common js from webapp into extension
* Try to use Android android.media.MediaMuxer for API level 18
Enhance play() to accept a canvas id.

Old way, web app developer need offer one video element and one canvas
element, as well as the JS code related with updateCanvas.

We move those common code into extension js, and change play() to
accept a Canvas element id. Thus, web app developer can write very
simple code as examples/ardrone_video/index.html with only one canvas
element. The video element will be added as hidden on demand.
Add some more callbacks
Add removeFile when finish playing last mp4 file