Create the egl windows and context with the right config

The egl config should be calculated when creating the window, and
the format of it should be set accordingly. The format of the window
and the one of the context will then match if using the same format
as input.

Change-Id: Ie93735171d8945111a450263089e192919249b68
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>