Where I am, flashing your lights directly behind someone is very rude, but flashing to let a semi know he's safe to pull over is polite and helpful. We also flash to let oncoming traffice know of a police car coming up, or that their lights are not on/ brights are on.
The slamming on brakes and other insane stuff your guy did is over the top rude and illegal.
Same here. Just because you(general) want to go faster than the person in front of you doesn't mean it's appropriate to make demands of them. Flashing your lights is supposed to be for when someone is actually in need of a warning - like they have their headlights off in the dark, or it's safe for a semi to merge. "Warning: I want to go faster, get out of my way," is not a legitimate one.
Imagine if someone shouted it at you while you both were walking on a sidewalk. If your reaction is different on foot, then perhaps the reaction in the multi-ton steel box moving so very much faster isn't really appropriate.
I don't think someone shouting on the sidewalk is a good comparison. Pedestrians generally have a variety of ways to communicate to the people around them, from gestures to speaking up to shouting. People in cars have their options substantially pared down--they have their lights and the horn, and that's about it. The standard things one needs to communicate while driving are handled by the standard lights: brake lights, turn signals, emergency flashers. The horn, as I was taught, is for emergencies where everyone needs to pay attention and react immediately, e.g., if someone is about to cause an accident. There are a few things that can be handled with a wave from one driver to another, but usually when both cars are stopped (e.g., waving someone on at an ambiguous all-way stop). There isn't really a standard way to communicate anything else. That's where flashing the headlights can come in (although it's clearly regionally dependent). My understanding of a brief flash or two of the headlights is that it means "It's not an emergency, but there's something going on that you need to be aware of." Common "somethings" are the fact that your headlights should be on, that your bright lights are blinding people, that it's safe to merge, or that there's a deer (or a cop) in the road ahead. Basically, it's a cue to look around because the other driver thinks there's something you haven't noticed and they have no way of telling you the specifics.
Personally, I think drawing someone's attention to the fact that people behind them want to pass since the right-hand lane is open seems reasonable. However, I do think the left-lane cruiser should be given some time to pull over without prompting (so if the car in the OP had just finished passing the trucks itself, IMO the OP should have waited a little to see if they were planning to pull over shortly after they got a little farther in front of the trucks). However, if someone remains cruising in the passing lane, despite the right lane being open, then reminding them once that others want to pass seems perfectly reasonable and polite to me. If they ignore the signal, then I think you need to drop it. They probably either don't understand what you're trying to tell them or they've chosen not to comply, whether for a legitimate reason or just to be difficult.
And of course, there is no excuse for deliberately trying to get someone to crash by slamming on the brakes in front of them on the highway.