Added SDK / NDK detection based on PATH - tested on Linux only

This is done similarly to ant detection.
Tested on Linux AlexV-Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

This is a rebased version of #6510 after cocos2d-x repository compression.