Is there a limit to how fast I can do damage to a mob or player using a weapon, such as a sword? If so, what are those limits?
All enemies (and I believe this is actually Entities, not just hostile mobs) have an invulnerability period after you strike them. That is when they turn red and only lasts for a split second (for the most part).
You can see it when you are striking a cow or the like and while its harder to see on things like a blaze, you can swing your sword to check. A blaze I believe takes three hits with an Iron sword to kill it. If you swing your sword fast you will be able to hit it I believe 4-5 times before it dies as only three of the hits will actually register and do damage.
Please note that this is regardless of how fast you swing, and in fact the faster you swing the more wasted uses of your weapon will occur so if you are buffed by a potion, beacon or whatever else may be available to you, then watch your attacks a bit more carefully.
Side Note: A mod where this is very easy to see is Aether and their cube boss (Which is what first brought it to my attention). You could go through 2-3 picks constantly hacking at the boss but any strike done while it was red would not actually cause it damage when it would only take a pick and a half or so of hits to take it out.
Yes, your swing speed. There are two effects that can change this. Haste, which can be acquired from a beacon, will quicken the speed at which you mine, ergo your swing speed. Mining fatigue, which must be spawned as a potion in via commands, or other mods, makes your block breaking slower, ergo reducing your swing speed and the rate at which you output damage.
I bet there is a more mathematical answer, but this is all i could do at a moments notice :)
From my experience, there is definitely an upper limit to damage given in a specified time.
I run a bunch of macros on my PC and one of them makes me 'left-click' once every 5 milliseconds. Ive destroyed an iron sword in about 10 seconds by holding it on a player. The green durability bar just vanishes! haha
While I should have killed them in roughly one second, it still took longer. Though it WAS incredibly effective! I use this for PVP, but with mobs it behaves the same way. I HAVE tested it though and it really does click that fast.
From the official Minecraft wiki:
Against a single target, DPS is effectively limited to 2 due to damage immunity.
Thus, the delay is 0.5 seconds, or 10 server ticks.