Android: set proper linker flags also for shared libs and modules.

Apparently one variable wasn't enough. Deduplicated the code to make it
cleaner.
Android: oh, there is variable also for implicit include dirs.
Android: use proper STL to have exceptions and RTTI.