Aside from what has been talked about above, you might want to consider a clogged fuel filter. If it hasn't been changed, and is relatively easy to access, it's a good maintenance item to replace anyway at 95K miles, IMO. A fuel starved engine will run lean, and therefore will run hotter, so you might smell that this is happening, as you sort of described. It will also hiccup a bit.
If it's spark related, then it could very well be the CKP, aka the crank position sensor. That said, these are usually a real bear to get to for the unseasoned mechanic in particular. With many cars easiest access to potentially failed part can be a prime determinant in how one goes about fixing things. Good luck with your Mazda.