client: make puavo-run-xrandr execute xrandr repeatedly (max 20 times) until success

At least some combinations of radeon driver + chipset
(3.13.0-36.63+opinsys1), xrandr seems to fail randomly when setting
display modes. However, given enough times, xrandr can eventually
succeed. Here, we assume 20 times is more than enough.

Of course the problem should be fixed in lower levels, but this
workaround seems to hide the problem from user's perspective quite
effectively.

Details:

xrandr gives following error message:
xrandr: cannot find mode 1024x768

radeon seems to give at least two different call traces:
[ 3097.957798] ------------[ cut here ]------------
[ 3097.957834] WARNING: CPU: 0 PID: 14561 at /tmp/opinsys-linux/drivers/gpu/drm/drm_crtc.c:2097 drm_mode_set_config_internal+0xb0/0xc0 [drm]()
[ 3097.957860] Modules linked in: cts nfsv4 snd_hrtimer cuse bridge stp llc zram(C) autofs4 deflate ctr twofish_generic twofish_i586 twofish_common camellia_generic serpent_sse2_i586 xts serpent_generic lrw gf128mul glue_helper ablk_helper cryptd blowfish_generic blowfish_common cast5_generic cast_common des_generic cmac xcbc rmd160 crypto_null af_key xfrm_algo wl(POX) snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm lib80211 arc4 rt2800pci snd_page_alloc hp_wmi rt2800mmio sparse_keymap snd_seq_midi rt2800lib snd_seq_midi_event rt2x00pci rt2x00mmio snd_rawmidi rt2x00lib snd_seq mac80211 snd_seq_device kvm snd_timer cfg80211 snd eeprom_93cx6 crc_ccitt serio_raw k8temp soundcore joydev sp5100_tco i2c_piix4 rfcomm bnep bluetooth mac_hid shpchp rpcsec_gss_krb5 nfsd parport_pc auth_rpcgss binfmt_misc ppdev nfs_acl nfs lockd lp parport sunrpc fscache dm_crypt overlayfs squashfs nbd pata_acpi hid_generic usbhid hid radeon i2c_algo_bit ttm drm_kms_helper tg3 psmouse ahci drm ptp pata_atiixp libahci wmi pps_core ati_agp floppy
[ 3097.957875] CPU: 0 PID: 14561 Comm: Xorg Tainted: P         C OX 3.13.0-36-generic #63+opinsys1
[ 3097.957876] Hardware name: Hewlett-Packard HP Compaq dc5750 Microtower/0A64h, BIOS 786E3 v02.10 01/25/2007
[ 3097.957880]  00000000 00000000 ec517bd8 c1653137 00000000 ec517c08 c105696e c182f98c
[ 3097.957883]  00000000 000038e1 f8552670 00000831 f8538290 f8538290 f746f170 f7401000
[ 3097.957885]  00000000 ec517c18 c1056a32 00000009 00000000 ec517c2c f8538290 00000000
[ 3097.957886] Call Trace:
[ 3097.957894]  [<c1653137>] dump_stack+0x41/0x52
[ 3097.957898]  [<c105696e>] warn_slowpath_common+0x7e/0xa0
[ 3097.957914]  [<f8538290>] ? drm_mode_set_config_internal+0xb0/0xc0 [drm]
[ 3097.957927]  [<f8538290>] ? drm_mode_set_config_internal+0xb0/0xc0 [drm]
[ 3097.957930]  [<c1056a32>] warn_slowpath_null+0x22/0x30
[ 3097.957944]  [<f8538290>] drm_mode_set_config_internal+0xb0/0xc0 [drm]
[ 3097.957951]  [<f84d893d>] drm_fb_helper_set_par+0x4d/0x710 [drm_kms_helper]
[ 3097.957954]  [<c1350fed>] fb_set_var+0x1bd/0x410
[ 3097.957957]  [<c108a338>] ? check_preempt_wakeup+0x138/0x250
[ 3097.957959]  [<c1080e32>] ? check_preempt_curr+0x72/0x90
[ 3097.957962]  [<c135ca4e>] fbcon_blank+0x1ee/0x2e0
[ 3097.957965]  [<c1135893>] ? shmem_recalc_inode+0x73/0xa0
[ 3097.957969]  [<c13dc246>] do_unblank_screen+0xa6/0x1c0
[ 3097.957972]  [<c11b3efc>] ? fsnotify_clear_marks_by_inode+0x7c/0xf0
[ 3097.957974]  [<c13d3a0e>] vt_ioctl+0x49e/0x1080
[ 3097.957977]  [<c10ad98c>] ? call_rcu_sched+0x1c/0x20
[ 3097.957979]  [<c119143c>] ? evict+0xec/0x170
[ 3097.957981]  [<c13d3570>] ? complete_change_console+0xe0/0xe0
[ 3097.957984]  [<c13c9503>] tty_ioctl+0x233/0xa20
[ 3097.957986]  [<c10ad98c>] ? call_rcu_sched+0x1c/0x20
[ 3097.957988]  [<c13c92d0>] ? no_tty+0x30/0x30
[ 3097.957991]  [<c118a292>] do_vfs_ioctl+0x2e2/0x4d0
[ 3097.957994]  [<c12fd3d0>] ? lockref_put_or_lock+0x20/0x30
[ 3097.957995]  [<c118d26e>] ? dput+0x1e/0x150
[ 3097.957998]  [<c119520d>] ? mntput+0x1d/0x30
[ 3097.958000]  [<c117ac45>] ? __fput+0x155/0x210
[ 3097.958002]  [<c118a4e0>] SyS_ioctl+0x60/0x80
[ 3097.958006]  [<c16614cd>] sysenter_do_call+0x12/0x12
[ 3097.958007] ---[ end trace 1a427f04f56421a2 ]---

[ 85.302090] ------------[ cut here ]------------
[ 85.302136] WARNING: CPU: 0 PID: 2624 at /tmp/opinsys-linux/drivers/gpu/drm/drm_crtc.c:2097 drm_mode_set_config_internal+0xb0/0xc0 [drm]()
[ 85.302138] Modules linked in: cts nfsv4 snd_hrtimer cuse bridge stp llc zram(C) autofs4 deflate ctr twofish_generic twofish_i586 twofish_common camellia_generic serpent_sse2_i586 xts serpent_generic lrw gf128mul glue_helper ablk_helper cryptd blowfish_generic blowfish_common cast5_generic cast_common des_generic cmac xcbc rmd160 crypto_null af_key xfrm_algo wl(POX) snd_hda_codec_realtek snd_hda_intel snd_hda_codec lib80211 arc4 snd_hwdep rt2800pci snd_pcm rt2800mmio hp_wmi rt2800lib sparse_keymap snd_page_alloc rt2x00pci snd_seq_midi snd_seq_midi_event rt2x00mmio snd_rawmidi rt2x00lib kvm mac80211 snd_seq snd_seq_device snd_timer cfg80211 snd eeprom_93cx6 crc_ccitt soundcore serio_raw k8temp joydev sp5100_tco i2c_piix4 rfcomm bnep bluetooth shpchp mac_hid parport_pc ppdev lp parport rpcsec_gss_krb5 nfsd auth_rpcgss nfs_acl nfs binfmt_misc lockd sunrpc fscache dm_crypt overlayfs squashfs nbd pata_acpi hid_generic usbhid hid radeon i2c_algo_bit ttm drm_kms_helper ahci tg3 psmouse floppy drm wmi pata_atiixp ptp ati_agp pps_core libahci
[ 85.302199] CPU: 0 PID: 2624 Comm: Xorg Tainted: P C OX 3.13.0-36-generic #63+opinsys1
[ 85.302201] Hardware name: Hewlett-Packard HP Compaq dc5750 Microtower/0A64h, BIOS 786E3 v02.10 01/25/2007
[ 85.302203] 00000000 00000000 f0a97d6c c1653137 00000000 f0a97d9c c105696e c182f98c
[ 85.302208] 00000000 00000a40 f8515670 00000831 f84fb290 f84fb290 f7400700 f740a000
[ 85.302213] 00000000 f0a97dac c1056a32 00000009 00000000 f0a97dc0 f84fb290 f7400700
[ 85.302217] Call Trace:
[ 85.302226] [<c1653137>] dump_stack+0x41/0x52
[ 85.302232] [<c105696e>] warn_slowpath_common+0x7e/0xa0
[ 85.302249] [<f84fb290>] ? drm_mode_set_config_internal+0xb0/0xc0 [drm]
[ 85.302276] [<f84fb290>] ? drm_mode_set_config_internal+0xb0/0xc0 [drm]
[ 85.302280] [<c1056a32>] warn_slowpath_null+0x22/0x30
[ 85.302295] [<f84fb290>] drm_mode_set_config_internal+0xb0/0xc0 [drm]
[ 85.302311] [<f84fdd1f>] drm_mode_setcrtc+0xdf/0x560 [drm]
[ 85.302331] [<f84fdc40>] ? drm_mode_setplane+0x400/0x400 [drm]
[ 85.302343] [<f84f0792>] drm_ioctl+0x472/0x500 [drm]
[ 85.302363] [<f84fdc40>] ? drm_mode_setplane+0x400/0x400 [drm]
[ 85.302370] [<c14181c1>] ? __pm_runtime_resume+0x51/0x70
[ 85.302405] [<f870b0de>] radeon_drm_ioctl+0x3e/0x70 [radeon]
[ 85.302424] [<f870b0a0>] ? radeon_resume+0x50/0x50 [radeon]
[ 85.302429] [<c118a292>] do_vfs_ioctl+0x2e2/0x4d0
[ 85.302433] [<c16568c8>] ? __schedule+0x358/0x770
[ 85.302437] [<c117b4f1>] ? __sb_end_write+0x31/0x70
[ 85.302440] [<c1179a45>] ? vfs_write+0x165/0x1b0
[ 85.302443] [<c118a4e0>] SyS_ioctl+0x60/0x80
[ 85.302447] [<c16614cd>] sysenter_do_call+0x12/0x12
[ 85.302449] ---[ end trace 9abdde32ee1ab181 ]---