rewrite image preview for diff views

use shared functions to load images.
note with this change it lose the ability to show which image is old
and which image is new.
replace querySelectorAll with a new utility function
use Array.map instead of Array.forEach
remove unused variable
add "image-new" or "image-old" to diff images
fix "image-old" applying to newly added files.