Add walletdb functions to read/write HD master key.