gio: new g_output_stream_close_retry() function.

Allow setting a delay to retry closing an output stream when non-fatal
errors occured. The delay is not a general delay for the whole closure
process, but per action which can be delayed unexpectedly yet non
fatally.

Typically this deals with Windows lock mechanism where a file being
opened by another process cannot be overwritten, which was causing file
saves to fail randomly when the temporary file cannot be moved over the
original file because some third-party process happened to read the file
at the same instant (typically antiviruses or cloud clients checking if
a file needs syncing). This cannot help if a file is locked for too long
time, hence this is up to implementers to determine appropriate
acceptable delays.

Subclasses of GOutputStream will need to implement the new virtual
method close_fn_retry() to benefit from this retry feature, otherwise
g_output_stream_close_retry() will behave as g_output_stream_close().
Currently only GLocalFileOutputStream implements this method.
8 jobs for wip/Jehan/Windows-lock-file-on-rename in 14 minutes and 7 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Build
passed #254391
cross-android_api21_arm64

00:03:51

passed #254392
cross-android_api28_arm64

00:03:50

passed #254393
cross-mingw64

00:04:39

passed #254389
fedora-x86_64

00:07:06

passed #254390
G_DISABLE_ASSERT

00:04:41

passed #254394
win32
msys2-mingw32

00:11:23

passed #254395
win32
vs2017-x64

00:09:48

 
  Coverage
passed #254396
coverage

00:02:44

74.9%