Adds tests for stale-if-error behaviour.

This also fixes:
 * Adding duplicate headers on stale responses that are handled in
   onComplete.
 * Overwriting an event variable with an exception.
 * can_cache test assuming can_cache works in error conditions.
Merge pull request #30 from deviantintegral/stale-error-tests

Adds tests for stale-if-error behaviour.