The impact of bars on the mid-infrared dust emission of spiral galaxies: global and circumnuclear properties