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.