refactor image comparison

 - refactor NamedTemporaryFile to class instead of function factory
 - sublass it to ImageComparison
   - use "with" statement for cleaning up and optionally keeping testrun images (environment variable can be used to store testrun images)
   - cleaner, shorter use in tests for image comparison
   - less duplicated code

I think it should be OK but please try tests on Windows/Mac.

EDIT:
 - updated baseline images (and travis test runner) to matplotlib 1.3.0
 - uploading images to imgur on failure (thanks @krischer)
 - setting higher tolerance for image comparison (still lower than what matplotlib uses)