Libretro updates

Please merge this PR otherwise the two codebases are going to be badly out of sync. 

I want to avoid maintenancce chores as much as possible hence the creation of Makefile.common that will be used for both the Android JNI Makefiles and the regular Makefile.

If you have any objections with regard to the other patches ,you could selectively cherrypick just the latest ones to do with the Makefiles.