Fixed #5943: Support local image for cc.loader.loadImg, and improve image loading logic