surfaceflinger: Work around aliasing violations

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
surfaceflinger: Don't crash on missing functions in hwcomposers

Some hwcomposers -- most notably hwcomposer.default.so -- don't
implement blank() or eventControl().
Don't crash when trying to use them.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
surfaceflinger: Handle screen timeout on hw without vsync

timeout currently at 1 second waiting for vsync. With
this change timeout happens at 16ms.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
frameworks/base: Make sure Singleton instantiations are exported

This fixes using Singletons across shared library borders
with gcc 4.7+

Change-Id: I84b9cc99add4ace64c16e4fa8414a4fc7e4693c7
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>