src: replace c-style casts with c++-style casts
src: simplify HandleWrap initialization
src: add endianness helper functions
buffer: guard against pointer aliasing issues
os: use IsBigEndian() in GetEndianness() function
buffer: simplify ReadFloatGeneric offset checks
buffer: guard against integer overflow