My engine has an idle switch built into the butterfly valve assembly which the ECU uses to know when it needs to do its idle stabilizing thing. You could tap into that wire to know when you're coasting.
My alternator (Valeo, 90 A) unfortunately has internal field wires; the only skinny wire running out of it is the blue one going to the alternator indicator light in the dash. AndrewJ and psmithrt, are you sure that disconnecting this wire will turn off the alternator?
I'm a bit scared when using this technique that voltage peaks might fry the electronics.
Here's a good "Alternators 101" tutorial:
http://www.autoshop101.com/trainmodu...or/alt102.html
More alternator circuitry:
http://www.alternatorparts.com/under...lternators.htm
There should probably be a short delay after reaching idle before you re-engage the alternator so you don't get a little voltage blip every time you change gears.