autotests: Fix ASAN issues in TestWaylandSurface::testStaticAccessor
We need to store surface ids before destroying the corresponding surfaces in order to avoid heap-use-after-free errors.
We need to store surface ids before destroying the corresponding surfaces in order to avoid heap-use-after-free errors.