Allow dumping pstat.Stats file to a directory for each request.

This is inspired by django-extensions 'runprofileserver'. The ProfileMiddleware will, when given the ``prof_directory`` argument, will, for every request, save the profile stats to a file.

It allows more after-the-fact analysis looking at the output of print_stats. It also
allows use of graphical tools to analyse the stats.