Fixing reading header in mmap buffer
Fixing reading header in mmap buffer

When reading the header, we need to exit immediately when the requested size is less than the available bytes.
And inform the caller that the reading is not successful.

HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit,HPCToolkit/hpctoolkit