trace.py: optimize split_format()

This improves all trace.py commands by 30%. We're using memoization
techinque to save computation.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace.py: optimize unpack()

This brings a small but noticable improvement.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>