perf_event_open enable sysfs exported events

perf_event exports a bunch of event info via /sys under
/sys/bus/event_source/devices

By parsing these files it's possible to generate more likely valid
(and almost-valid) events.  It also makes exercising expanded PMUs
(such as uncore events on recent Intel machines) possible.

The included somewhat ugly patch enables generating events based
on the sysfs files (1 time out of 9).  It sets up a table of all
possible event fields and generalized events for all detected event
types the first time such an event is requested, then uses this table
to generate events subsequent times.

The parser is possibly fragile.  The perf tool actually has a full
lexer to handle the parsing of these files.  I've tested on a core2
and sandybridge machine but it might possibly fail on more obscure
machines, especially if any have non-contiguous event fields.

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>