Does damage resolve (waking a sleeping target) between each individual attack?
The damage resolves on a per attack basis
In the PHB between pages 193 and 194 is "Making an Attack" header, which specifies the order of an attack. Resolving the attack is when you deal damage.
Chapter 9: Combat, Making An Attack: You make the attack roll. On a hit, you roll damage...
If there's ever any question whether something you're doing counts as an attack, the rule is simple: if you're making an attack roll, you're making an attack
For instance, with Extra Attack at level 5, you're making 2 attack rolls and therefore 2 instances of damage. If they're unconscious from sleep, the first attack automatically crits if you hit their AC, then they wake up, and the second attack does not automatically crit. It's important to note that you only get automatic crits on an unconscious target if you are within 5 feet of it, and the same applies for advantage on prone targets.
The same logic applies for spells, any time you make a spell attack roll, you're doing an instance of damage. Spells that add to your attack damage, like smite spells, add on to the initial damage, so that damage is a crit as well for the first attack.
For things like Magic Missile, I've written an answer on another question that may be helpful.
For spells without attack rolls, you need to look at it on a case by case basis. I can't think of a spell besides magic missile that would appear to have multiple instances of damage within itself that are not separated by time or triggers.
Is there a difference between abilities granting multiple attacks as part of the same action vs. a different action (such as bonus action)?
The same logic applies as above: if you're making separate attack rolls, you're making separate attacks. In addition, bonus actions and actions happen at different points in time. See page 189 of the PHB
Chapter 9: Combat, Bonus Actions: You choose when you take a bonus action during your turn...
If you were granted an attack or spell with a bonus action that dealt damage, it would crit (if within 5 feet of the sleeping target), and any actions after that would not automatically crit. Once again, smite spells like Thunderous Smite are cast as a bonus action, but only trigger damage once you hit with a melee weapon and their damage is added, which makes it a part of your melee attack damage. The first attack with smite will crit, so double all of your damage dice, including the smite dice.
Because of questions like these, I highly recommend rolling your attacks and damage separately. Some players are tempted to roll all attacks together and then roll their damage all at once for ease of use (or sometimes roll damage once and double/triple the damage! The horror!), and cutting corners like that can, in this case, miscalculate critical damage or deal too much damage to one person (you can split your attacks up between movement!).