Publish and use libOpenglRender interface header

The emulator opengles.c file duplicated the function declarations from
libOpenglRenderer's render_api.h instead of including it directly.
This led to multiple bugs since the declarations didn't actually
match, but there was no way for the compiler or dynamic loader to
check this.

This change makes opengles.c include render_api.h to get function
pointer prototypes, and changes the prototypes/implementation as
necessary to make both sides actually match. It should be much more
difficult to introduce interface mismatch bugs now.

Two bugs this change would have prevented:
(a) The interface mismatch caused by inconsistent branching which led
    to GPU acceleration crashing on Windows. With this change, we
    would have caught the problem at compile time.
(b) The emulator verbose log has always been printing "Can't start
    OpenGLES renderer?" even when the renderer started fine. This is
    because the renderer was returning a bool (true == success) but
    the emulator's declaration said it returned int, and the emulator
    assumed 0 meant success. This difference in return type should now
    be caught at compile time.

Change-Id: Iab3b6960e221edd135b515a166cf991b62bb60c9
2 files changed