Recreate the egl surfaces after they have been invalidated

This is a backport of https://codereview.qt-project.org/#change,83594