Fix pmdapapi warnings during compilation

Move native component variables within the #ifdef, add explicit
assignment for first argument in for loop, change variable type.
Merge branch 'dev' of ssh://sourceware.org/git/pcpfans into lberk/dev
Merge branch 'dev' of ssh://sourceware.org/git/pcpfans into lberk/dev

Conflicts:
	src/pmdas/papi/papi.c
pmda papi: fix a couple more compiler warnings (conditional code)
Merge branch 'dev' of ssh://sourceware.org/git/pcpfans into lberk/dev
pmda root: a privileged pmcd co-process

Initial implementation of "pmdaroot", a helper co-process
for pmcd that runs with elevated privileges and is able to
(well, will be able to soon) offer services to pmcd and to
other PMDAs where root access is required.

See http://www.pcp.io/pipermail/pcp/2014-June/005030.html
for additional rationale.  I've implemented this as a PMDA
(rather than simply forking pmcd early and embedding all of
the code in pmcd itself, as considered earlier) as that has
a number of advantages:
- it can be switched off if there's a problem
- complete code and functional isolation from pmcd
- i.e. no changes required to pmcd to support it - safe!
- uses existing pmcd mechanisms to bootstrap, which means
  less code was needed
- ability to export metrics about its operation, such as
  the containers it has found and what state they're in.

I also recycled PMDA domain number 1 for this PMDA, because
IRIX is gone and this is hopefully going to become a widely
used piece of infrastructure over time, so it seems a good
candidate for using that number.  It is enabled-by-default
for new installations, Install/Remove scripts are provided
for now also (but maybe not in the long term).

This initial version provides a simple mechanism to discover
information about Docker containers, in preparation for the
next stages.  It will probably need to be enhanced to using
the Docker daemon at some point (via the remote Docker API &
AF_UNIX socket - see details on docker.io) instead of simply
grovelling around on-disk, but for now thats what it uses.

Support for exporting state about other styles of container
will also be added in due course I hope.  The pmdaroot code
has been written such that drop-in container "drivers" for
any container technology could be added (there are many on
Linux now, Solaris Zones, and so on).
Merge branch 'dev' of ssh://sourceware.org/git/pcpfans into lberk/dev
Add new flex-devel buildreq to fedora.spec

Some of the awesome new hotproc functionality requires flex-devel
to build pcp, add it to the spec file.
Change pmdapapi case statements to refer to macro enums

Lets try to make sure the ordering of papi metrics doesn't change
by using a macro enum and referring to those in the switch/case
statements.  This also avoids having to label each manually with
a comment, which, as the diff shows, can become out of date.
pmdaroot/libpcp_pmda: interfaces for changing namespaces

Work-in-progress commit with the majority of the code behind
the PCP collector privilege escalation mechanism, and with a
Linux-kernel-namespace switching API for PMDAs with metrics
that need to be container namespace aware, as the first use
case.  The pmcd.hostname metric from the pmcd DSO PMDA has
been converted over to using the new API - others remaining
to be tackled include network.interface.*, filesys.*, ipc.*
and one or two others.  See also notes in the code as to some
other PMDAs that could use pmdaroot services (e.g. pmdaproc
restricting per-process indom to just processes from a given
containers cgroups, that sort of thing).

Committing it now, even though its not quite done, since it
has no impact on the code when not used (which it isn't yet)
and some people are interested in seeing how it fits together
while I'm away on vacation.  In the couple of places where
more coding will be needed "TODO" markers have been inserted
to guide the way.
qa: notrun qa/955 until LINUX_STATSPATH/filter-determinisism
libpcp: fix one-off fd leak on a socket error path
qa: fix regression in qa/274 from libpmda callback changes
qa: simplify qa/274 to single-output producing form
Merge branch 'lberk/dev' of git://sourceware.org/git/pcpfans into lberk-merge
build: missed a __pmda symbol name translation
build: fix namespace cleanup for pmdaroot API names
Fix compiler warning in call to pmdaEnterContainerNameSpace():

Incompatible pointer type. Passed the address of array of int when
the prototype expects pointer to int.