Ported perf code to work on arm and adjusted to changes in the kernel that broke mmap().

The kernel doesn't allow anymore to setup a perf fd with any cpu and the inherit flag
(to take into account threads created later on), so now we setup a fd/mmap area for each
cpu in the system.
Merge pull request #739 from mono/upstream-master

Ported perf code to work on arm and adjusted to changes in the kernel th...