Fix off-by-one error

The array 'suffs' has four entries. The nested for-loop, however, only
traversed up to the third entry and failed to reach the fourth entry
'.tgz'.

Signed-off-by: David Vest <davve@opera.com>
Future proof array iteration

Instead of relying on a constant being up-to-date with the length of
an specific array, add a NULL entry last to the array and iterate up
to that instead.

Signed-off-by: David Vest <davve@opera.com>
fix icecc-create-env with clang 3.3+

It now has a subdirectory in its internal include directory, so plain wildcard
doesn't work well, use find to get paths for each file.
add "[Cc]annot allocate memory" to the list of OOM error messages
protect against repeatedly choosing broken remote after scheduler start
Merge pull request #64 from doomdavve/fix-off-by-one-take-two

Fix off-by-one error
fix /var/run/icecc handling

Was severely broken by 203b51b588fa2e550feeeef73d91e6d72afeafa9.
It first created /var/run/icecc, which was successful and didn't have
the follow-up chown/chmod, so they ended up as root-owned, because
this happened before dropping privileges using libcap-ng. This caused
the later access() check for it to fail, and ended up using the user
path, which however crashed because of there being no $HOME set.
So after every boot, if /var/run was empty, the first launch failed.
All following launches were successful, because the mkdir() failed,
leaving to proper chown/chmod.

Fix by always doing chown/chmod unconditionally. Also do not use
the access() check for detecting if it's the system or user way of launching.
WIP: KDE coding style

Signed-off-by: Rodrigo Belem <rodrigo.belem@gmail.com>