Get string from RawValue rather than reading from memory again.
Rewrite getScalarValueAsString.

This is platform independent as far as type sizes are concerned. For most types
it internally creates an llvm::APSInt or llvm::APFloat and then prints the
string from that. Note that we're not doing any byte swapping yet (i.e. it won't
behave properly if the traced platform has a different endianness), but that is
relatively simple from this point.

This removes most of the platform dependent nastiness from handling the
recreated state - the next thing to do is fix the execution trace format itself.