[mbed-tls] Optimized swap and endianness macros (MBed TLS 2.28.x)