render: Check whether the root surface isn't NULL in view_render_to_buffer
This might happen with already unmapped but not yet destroyed views.
Also, allow view_render_to_buffer
to indicate failure and forward that to the client in thumbnail_frame_handle_copy
.