Two commits; the first just refactors most of the alert-handling code into alert.cpp/alert.h
The second gives testnet its own alert key, which is the right thing to do because if it shares the main network's key somebody could take testnet test alerts and rebroadcast them on the main network.