Adds a context managing profiler

Simple wrapper which enables a context managing (with-statement)
profiler. Also adds test associated with this method of profiling.

The class (currently) just takes three initialization arguments, stats
output, summary output and trace output.