Fix lots of sign and parentheses warnings
Added LWM2M_EMBEDDED_MODE which overrides gettimeofday, malloc and free.
Simple itoa for platforms where snprintf is known to be broken for int64_t