Use rand_r for all architectures except msp430.
Especially arm toolchains are compiled with newlib library,
and using standard rand pulls impure_ptr stuff into executable,
raising it's size.
Tune uip_buf access macros to match real alignments of header structures.