Deserializing wallet extensions, lock order is now wallet and then extension.

A deadlock condition exists for locks on Wallet and WalletExtension. At save of wallet, wallet lock is acquired and then wallet extensions lock is acquired. At deserialization of a WalletExtension, the extension's lock is acquired and then the wallet lock can be acquired. This happens if the WalletExtension access the wallet, e.g. getTransaction as used in StoredPaymentChannelClientStates. The proposed fix unconditionally acquires the wallet lock before any extension locks.
I don't know if Mike convention has this rule, but I think on an if statement either all branches are single statements (and thus curly braces can be omitted) or curly braces have to be present on all branches. Mixing the two styles is not good practise imho.