[XRay] Fix FunctionRecord serialization

This change makes the writer implementation more consistent with the way
fields are written down to avoid assumptions on bitfield order and
padding. We also fix an inconsistency between the type returned by the
`delta()` accessor to match the data member it's returning.

This is a follow-up to D51289 and D51210.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341230 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed