put png packing into a function, make it parallel.
Introduce a MAX_CORES variable.
Merge remote-tracking branch 'mainline/master'

Conflicts:
	image_optim.sh
image_optim Wed Jan 16 23:51:04 CET 2013
move initial checks to a function, remove unused MAX_CORES var.
correct log file.