perf_event_open() coverage improvements

Here's an updated patch that more or less exercises all of the
perf_event_open() bits, up to around the 3.6 kernel or so.

The patch is standalone against current trinity git.

It could definitely use some review and tuning.

I haven't turned up any issues with it, but that's partly because in my
experience (the recent exploit being an exception) perf_event bugs rarely
manifest with just an open call; they usually involve
reads/writes/ioctls/mmaps/signals on the fd that is opened, as well as
problems after fork/exec or else on complex events made of multiple
perf_event_open() calls chained together (the call can take a previously
opened fd as an argument).  Testing things like this will be more
difficult.

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