It's as you said: Nokia N900, hands down.
You get:
1. Fully unlocked phone, unlocked bootloader and real Linux.
2. Loads of "hacker" tools and apps.
3. Busybox ash(stock) or full Bash if you want.
4. The phone part is fully scriptable with dbus commands. There's even a dbus monitor daemon to run a script when a certain dbus signal is sent.
5. Hardware keyboard, decent specs(CPU's a bit weak, but greatly overclockable), and good screen.
6. Debian Chroot gives full LXDE system right on your phone if you need it.
7. Real web-browser functionality: tablet-friendly stock microB(FF based, renders like FF 3), Firefox Mobile, Chromium(desktop version basically), Opera
Really, it seems to be the only option.
The N9 might also be doable, but there you have to enable developer mode, and have no hardware keyboard, screen's poorer(AMOLED vs LCD), and it's just more hassle.