Added summarization functions for traces

Added `stats` function to calculate posterior statistics and `summary` function to pretty-print them.