Since no-one else has taken a stab at this one, I'll have a go at it. If nothing else, maybe it'll spur someone else on.
I don't have a laptop or a current Gentoo handy, so maybe Ubuntu will suffice. My current desktop is Ubuntu 10.04... you didn't mention your version - hopefully it's close.
Anyway, I'd look at the Upstart configuration (or /etc/inittab if you aren't using Upstart). Verify you are running upstart by:
# dpkg --list | grep upstart
ii upstart 0.6.5-7 event-based init daemon
Obviously, if you don't see something similar, you are likely using init. Both tools (upstart and init) are designed to do things on startup, shutdown, etc (ie, events).
In the case of Upstart, cd to your /etc/init directory and have a peek at the files there. Since I'm not on a laptop, I don't have a "hibernate or suspend" function, but I'd bet you do. Try some greps therein to see:
/etc/init# egrep -i "suspend|hibernate" *
However, my control-alt-delete.conf file strikes me as something interesting. If I peek at it, I see:
/etc/init# cat control-alt-delete.conf
# control-alt-delete - emergency keypress handling
#
# This task is run whenever the Control-Alt-Delete key combination is
# pressed, and performs a safe reboot of the machine.
description "emergency keypress handling"
author "Scott James Remnant <scott@netsplit.com>"
start on control-alt-delete
task
exec shutdown -r now "Control-Alt-Delete pressed"
I'd be willing to bet you could customize that last line to script some SSH logouts, or just about anything you like. You'd want to update (or create) the proper config file. I'm guessing a laptop install will have something specific for hibernate/suspend/etc. Looking at some of the other files (like apport.conf) I see that the configuration files actually support scripts embedded within them.
If you are dealing with init, instead of upstart, try looking at the /etc/inittab lines like:
# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop
...
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
Once you'd located the ideal spot, based on your config, it wouldn't be too difficult to throw together a bash script that could kill them off or the like.
Simple example:
#!/bin/bash
kill -9 `ps -ef | grep "[s]sh " | awk '{print $2}'`
I hope this at least gives you a starting point. Maybe there's an easier way, but I don't use laptops enough to know.
Almost forgot: Assuming you do any of that, you'd likely need to bounce init for it to take effect:
# kill -HUP 1