Add pre and post hooks to analyzers.

If an analyzer implements async preAnalysis and/or postAnalysis functions, these will be called at an appropriate time. This will enable e.g. starting the browsertime proxy once, and stopping it once per session.