Merge pull request #2255 from ulion/fix_plugin_setting_not_show_problem

Fix sometimes select plugin setting from context menu not works problem.
[atv2] - fix compile on 10.8/billy
fixed build with --enable-player=amlplayer, thx brianf21
[atv2] - fix compilation on 10.8 and all others once and for all. Dear buildbot. I really suggest you build this now - or i'm going to convince davilla to install android on your harddisk...
fix ass subs for GLES
guilib: simplify BindToTexture and support any unit

All stages we support are in order after texture 0
gl: add missing alpha setup for texture stages
gl: avoid using explicit texture, use bound texture
libdvdread: replace perror by fprintf so that it gets picked up in xbmc logs
opengl/d3d: add support for limited color levels (16-235)
Fix CurlFile::Exists/Stat for check ftp directory with proper cwd method.
Fix check common subtitle subdir existence without suffix slash bug.
intents: Add a java class for listening to intent broadcasts
Merge pull request #2275 from ulion/fix_checking_subtitle_common_subdir_without_slash_end_bug

Fix check common subtitle subdir existence without suffix slash bug.
intents: hook up a JNI_OnLoad for finding our java functions

This should be extended to do lots more, so that we can quickly add java code
and access it from native, without the mess that is jni.
Use GetProtocol() like other code does.
droid: remove the stateful life-cycle manager

Simply properly react to messages instead. This ends up being much cleaner and
more straightforward.

There were many problems with the old life-cycle code:
- It based all decisions on gain/loss of focus, which is incorrect, as that
  pertains to input rather than windowing.
- Due to the above, there were many race conditions.
- The startup/teardown were convoluted
- It was a mix of examples, a stateful one where the app keeps track of status,
  and a stateless one mainly handle by appglue. Since we really only care about
  a handful of events (startup/exit/newwindow/destroywindow mainly), stateless
  is the way to go for us.

This fixes random black-screens, fixes, and crashes when starting XBMC as a
launcher.
Fix double append to m_curlAliasList bug by NULL check.
Fix memory leak, Exists/Stat allocated resource not released correctly.
Merge pull request #2273 from FernetMenta/assfix

fix ass subs for GLES