Restore missing compilation durations

The `:compilation_ended` event is sent *after* `:rep_written`, so when the action is printed, the timing information won’t be available yet.

This PR lets nanoc determine the timing information when the rep is written, not when compilation has ended.

Fixes #374.