Allow giving names to traces and metrics, and print them when pretty-printing

Fixes https://github.com/numenta/nupic/issues/1374.
Builds on https://github.com/numenta/nupic/pull/1371.

@subutai 
It would be better if this kwarg had some unique prefix rather than following this pattern.