trace: Binary trace dump API

Add API to generate binary trace dump file with varying/optional levels of
information contained, suitable for wire export.

Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>