Fixed ImageItem.equals bugs, various silly mistakes (like comparing null with undefined).
Made static ImageItem functions actually static this time.
Added "deep" option to copyImagePool function.