Android: Implement JNI_OnLoad()

When building for Android, chances are that gstreamer is going to be
loaded from Java using System.loadLibrary(). In that case we can
initialize GStreamer (including static plugins), redirect log functions,
etc.

This code is copied from cerbero because it can be used with
gstreamer-full-1.0 too. Cerbero needs to be adapted to drop that code
and generate gst_init_static_plugins() function.
35 jobs for android in 35 minutes and 7 seconds (queued for 4 seconds)
latest
Status Job ID Name Coverage
  Build Docker
passed #4439599
alpine amd64 manifest builder docker

00:00:08

passed #4439598
android docker

00:00:08

passed #4439597
cerbero fedora amd64 docker

00:00:17

passed #4439596
fedora amd64 docker

00:00:17

passed #4439600
gst-indent amd64 docker

00:00:21

 
  Preparation
passed #4439602
gst indent

00:00:23

passed #4440209
manual
manifest

00:00:12

passed #4439601
manual
manifest

00:00:31

 
  Build
passed #4439611
gstreamer
build cerbero cross-android universal

00:28:32

canceled #4439615
gst-ios-13.2
build cerbero cross-ios universal

00:34:06

passed #4439612
gstreamer
build cerbero cross win32

00:13:03

passed #4439613
gstreamer
build cerbero cross win64

00:17:24

passed #4439610
gstreamer
build cerbero fedora x86_64

00:09:10

passed #4439614
gst-macos-10.15
build cerbero macos x86_64

00:27:43

passed #4439606
build clang fedora x86_64

00:04:57

manual #4439609
1809 windows docker allowed to fail manual
build msys2
passed #4439603
build nodebug fedora x86_64

00:03:37

passed #4439604
build static fedora x86_64

00:03:28

passed #4439605
build static nodebug fedora x86_64

00:03:27

passed #4439607
1809 windows docker
build vs2017 amd64

00:07:14

passed #4439608
1809 windows docker
build vs2017 x86

00:07:03

 
  Test
passed #4439616
gstreamer
check fedora

00:07:23

passed #4439617
gstreamer
integration testsuites fedora 1/4

00:13:22

passed #4439618
gstreamer
integration testsuites fedora 2/4

00:14:41

passed #4439619
gstreamer
integration testsuites fedora 3/4

00:13:48

passed #4439620
gstreamer
integration testsuites fedora 4/4

00:16:51

passed #4439625
gstreamer
valgrind bad

00:05:06

passed #4439622
gstreamer
valgrind base

00:08:28

passed #4439621
gstreamer
valgrind core

00:06:32

passed #4439626
gstreamer
valgrind ges

00:06:30

passed #4439623
gstreamer
valgrind good

00:12:20

passed #4439624
gstreamer
valgrind ugly

00:03:21

 
  Integrate
passed #4439627
cross-android universal examples

00:04:40

skipped #4439629
gst-ios-13.2
cross-ios universal examples
passed #4439628
documentation

00:10:58