Revamp certify dialogue

Certifying now works for individual user ids, and certs are preserved when saving privkeys. This has been tested more or less thoroughly using the code from my certs branch for certificate listing.