mir: set last state after initializing the surface
mir: update the framebuffer size on resize events

We need to use a mutex as mir handles these on
different threads, also using an event idle prevents
to get initialization errors on cogl side.