window-actor/wayland: Ensure to use allocation for black background check
The surface actors may not have a valid allocation when running the
test. The preferred height, which clutter_actor_get_size()
returns
in that case, can be wrong in certain cases, making us not add the black
background when it's actually needed.
Query the allocation instead, even at the expense of additional relayouts.
While on it, sneak it some small cleanups.
Closes #3024 (closed)