shell: Use buffer_scale as output scale on fullscreen DRIVER

It may happen that you e.g. fullscreen a 800x600 surface with
buffer_scale 1 (e.g. a 800x600 buffer) on an output that is
otherwise scale 2. In this case we want to temporarily set
the output scale to 1, as we're really scanning out of a
scale 1 buffer. This causes us to e.g. report the input
positions in the right place, etc.

When we restore the original mode we also restore the original
scale.

Note that the scale change is a purely compositor internal change,
to clients it still looks like the output is scale 2.
diff --git a/src/compositor.c b/src/compositor.c
index db5a32d..f382340 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -96,7 +96,7 @@
 				   uint32_t transform, uint32_t scale);
 
 WL_EXPORT int
-weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode)
+weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode, int32_t scale)
 {
 	struct weston_seat *seat;
 	pixman_region32_t old_output_region;
@@ -109,6 +109,8 @@
 	if (ret < 0)
 		return ret;
 
+        output->scale = scale;
+
 	pixman_region32_init(&old_output_region);
 	pixman_region32_copy(&old_output_region, &output->region);