Send monitor config to the agent on spice_main_set_display_enabled (#881072)

Currently we send an updated monitor-config to the agent whenever some
of the display settings are changed (whenever spice_main_set_display is
called), including when a new display is enabled, as that involves
creating a new window, which calls spice_main_set_display. The only
exception to this is when a display gets disabled.

This is rather inconistent, it causes the user to be able to move windows
in the guest to the now no longer visible monitor, and any windows which
were already there are hidden... until something else triggers us sending
updated monitor info. Withe gnome3 an alt-tab away and back again from a still
open display-window is enough to trigger the update, and then the guest will
all of a sudden become aware of the monitor no longer being there and
re-arrange windows accordingly, on an alt-tab in the client machine ...
not pretty.

So lets make things consistent and also send the agent updated monitor info
from spice_main_set_display_enabled, like we already do from
spice_main_set_display.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
spice-channel: plug a channel ref leak
spice-channel: fix state condition check in flush()
Release v0.16

v0.16
=====

- Fix crash with SSL connection (#890464)
- Send monitor config to the agent on spice_main_set_display_enabled() (#881072)
- Fix channel leak and wrong condition in spice_channel_flush()
- Build fixes
file-xfer: handling various transfer messages in main channel

This patch is aimed to handle various file xfer messages.

How it works:
0) our main channel introduces a API spice_main_file_copy_async().

1) When user drags a file and drop to spice client, spice client will
   catch a signal "drag-data-received", then it should call
   spice_main_file_copy_async() for transfering file to guest.

2) In main channel: when spice_main_file_copy_async() get called with file
   list passed, the API will send a start message which includes file
   and other needed information for each file. Then it will create a
   new xfer task and insert task list for each file, and return to caller.

3) According to the response message sent from guest, our main channel
   decides whether send more data, or cancel this xfer task.

4) When file transfer has finished, file xfer task will be removed from
   task list.

Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Signed-off-by: mathslinux <riegamaths@gmail.com>
file-xfer: disable file-xfer when agent is not connected

Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Signed-off-by: mathslinux <riegamaths@gmail.com>
file-xfer: handle "drag-data-received" signal

When user drags a file to SpiceDisplay and drops it, a signal named
"drag-data-received" will be emitted, the signal will be received by
SpiceDisplay, then our signal handler should receive data which contains
file path, and call spice_main_file_copy_async() to transfer file to guest.

Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
Signed-off-by: mathslinux <riegamaths@gmail.com>
file-xfer: avoid g_alloca() usage when possible
file-xfer: non-programming errors should be reported in async

It is fine to not return async errors for programming errors via
g_return_if_fail() and friends, however, we need to return proper
error if it's a normal run-time error.
file-xfer: try to report any error from file_info_async_cb()
file-xfer: move file_close_cb() above all to ease reading
file-xfer: use file_xfer_..() prefix for all internal copy functions
file-xfer: always take error if set in xfer_read_cb()