cpp: Ensure that hasSecret is correct after update
* lang/cpp/src/key.cpp (Key::update): Check for a secret key first before listing public keys.
This is a performance delay but the update should
only be called in a non gui thread anyway. The information
if we have the secret key for this key is important to provide
after update.