Checking a list of TSBs for this set of codes, this looks like a promising candidate:
01-028/04 MAZDA SPECIAL PROGRAM (MSP05) - 2004 MAZDA3 - O2 SENSOR DTC ERROR, P2195 / P2196
From what you describe, a problematic O2 sensor could easily lead to the idling, sputtering and smells that you describe. If the sensor is stuck reading full lean, it's highly likely that the car is pouring far more gas through the injectors than you'd ever want. Has the mileage dropped dramatically since the problem occured?