Flip the order for the all access check in linux_proc
pmwebd build fixes for RHEL5

Needed some casting/declaration tweaks for compatibility with both
older and newer gcc/g++ (checked on 4.1.2 and 4.8.3), and with older
glibc.  Also, need to propagate cairo cflags from pkg-config, because
some intra-cairo include's require -I/usr/include/cairo.  Full
pmwebd/graphite/etc. goodness seen on RHEL5 32-bit VM.
perl pmdas: fix inst-handling edge case and pmda_inst_name

Fix an edge case in the array-based indom handling, when the
instance set becomes zero.  Also implemented hash-variant of
pmda_inst_name - previously this worked for arrays only.

Test qa/758 exercises both of these scenarious using a newly
added test_perl PMDA, based on the original test case from
Tall Paul Smith and Andy Trigg (thanks guys!).
Merge branch 'martins_working' of https://github.com/ubccr/pcp into martins-merge
Merge branch 'fche/dev' of git://sourceware.org/git/pcpfans into fche-merge