Refactor EGL initilization
This is the first several commits of !348 (closed) split into its own MR, as @evelikov suggested, also with the feedback addressed. It contains refactoring for how EGL is initialized in the gl-renderer, to better provide a place for EGL devices to be handled in the future. However, these commits aren't specific to that and can just be seen as some general clean-up. The EGL device changes can be added again at the same time it has a user, which would be dmabuf-hints.