c/client: Split EGL creation functions into smaller helper functions

16 jobs for jakob/misc-fixes-from-android-work in 2 minutes and 21 seconds (queued for 3 seconds)