Add debug warning and return PM_ERR_CONV to papi.control.enable

Currently papi.control.enable will just silently fail if presented
with metrics it can't add, fix that.

*src/pmdas/papi/papi.c - add debug warning and return the error in
		         papi_store for enable
Account for control and available clusters in papi_text

papi_text was returning results from PAPI_enum_event which matched
the pcp item number, even when the metrics were in different cluters
(control and available, respectively).
Be more consistent with internal use of variable names

Remove all mentions of 'sts' and consistenly use retval
Rework saving previous papi values when adding/removing metrics

Previously, when we added or removed a metric that we were
tracking, we'd lose the previous values and all metrics would
restart from zero.  By adding a prev_metric value in papi_info,
we can systematically save the values, and add it to the atom->ull
in the fetchcallback
First step towards a fully dynamic papipmda (including pmns)

Remove the papi_info[].pmns_position variable and set_pmns_position
fuction.  Likewise, only add papi metrics to papi_info if they're
actually present on the current hardware.  In the future we might
need to add in another papi.'system'.metric to make the pmns fully
automatically generated and match with the various userspace programs
Move PAPI_event_info_t var into papi_info for metric descriptions

By moving the PAPI_event_info_t varible into the papi_info struct
we can ensure the references to the descriptions are persistent.
Make use of strtok in papi_pmid

Use strtok in pmda_papi function for a cleaner function
Add papi_children callback for generating the pmns dynamically

Order the papi metrics under papi.system.metric (expecting expansion
of metrics to capture pid/tid specifics later) and dynamically
generate the list of metrics based on what's actually available on
the current hardware.
Add spec file condition on architecture and distro for pmdapapi

Don't build pmda papi if on a version prior to rhel6 or on
s390/s390x.  The papi-devel package doesn't exist there.
Add example workflow for pmdapapi to man pages

pmdapapi makes use of pmstore to control what papi metrics are currently
being tracked and which aren't.  document this workflow in the manpage
Update the papi_fetchcallback mechanism for passing metric data

No longer loop through all the available events (as we generate the
pmns dynamically now), just use the idp->item that we're passed
Rename papi_pmid function to papi_name_lookup as requested

Rename function to be more descriptive
Drop unneeded parameter from check_papi_state

Drop unneeded parameter from the check_papi_state() function, and
don't mix up papi error values and pcp error values that we could
return.  Stick to papi.
Assign papi help text in papi_internal_init and only lookup values in papi_text

Assigning the values of {short,long}_descr can be done within papi_internal_init,
which allows us to simply recall the values in papi_text.
Remove remove second function paramter from remove_metric

Both parameters being passed were values from papi_info, if we
instead pass the specific position within the papi_info array,
we can determine the other values we need without passing extra
arguments
Implement papi.control.reset metric

papi.control.reset will zero the current papi values being counted
one must use papi.control.disable if they'd like the values to no
longer be in the active eventset
Remove internal enable and disable strings for papi metrics

We shouldn't require the use of these strings to pass back and forth.
Add checks around papi_children realloc statements

realloc's need a check to ensure the allocation returned with no errors.
If an error was found, throw __pmNoMem
Remove papi_string_status and inline the former function

The aforementioned function was incorrect in using a case statement
and assuming only one would be hit.  The papi state is a bitmask,
and we should be able to return more than one condition.  It is
also potentially useful to output the last known values of each active
metric.
papi_state returns a bitmask, so do a bitwise comparison, not direct compare.

instead of a direct comparison with PAPI_<state> we should just do a bitwise
AND to confirm the state