keymgr: Use Box<dyn EncodableKey> instead of Box<dyn Any>.
Prompted by !1337 (comment 2917701)
This will make it harder to accidentally return the wrong value from
Keystore::get
(the returned value is now at least guaranteed to
implement EncodableKey
).
Closes #937 (closed)