I'm imagining an RPC call something like:
signtext <bitcoinaddress> "MESSAGE..."
... returns signature, in some standards-compliant format, assuming bitcoinaddress corresponds to a public key in our wallet.
There should also be:
verify <bitcoinaddress> "MESSAGE" "SIGNATURE"
... which return true or false or "I have no idea what the public key for <bitcoinaddress> is".