Using platform independent variables when writing/loading values from StreamIndexedIO

Some of the changes in the file format introduced in Cortex 8 introduced 32 bit values that were saved from "unsigned int" variables. But that is platform dependent.

They have been replaced now by int32_t to guarantee that the files can be loaded on 32bit platform.

Added some extra checks to prevent these values to overflow, preventing corrupted files.