The `generate` RPC method:
- was introduced in 2010
- is now only used for testing
- reaches across multiple components (wallet, mining)

I propose we remove the wallet `generate` RPC method and update all tests to use the `generatetoaddress` RPC method. We can do this non-invasively in the test framework by adding a `generate` method to `TestNode` so that the individual tests do not need to be updated. We could also add a `generate` alias to the `generatetoaddress` RPC method.

Doing this removes a wallet->server dependency and simplifies the wallet->server interface (#10973).

I'm opening this issue before implementing in case anyone has objections.
"1. \"address_type\"           (string, optional) The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -changetype.\n"
            "\nResult:\n"
            "\"address\"    (string) The address\n"
            "\nExamples:\n"
            + HelpExampleCli("getrawchangeaddress", "")
            + HelpExampleRpc("getrawchangeaddress", "")
       );
    if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
        throw JSONRPCError(RPC_WALLET_ERROR, "Error: Private keys are disabled for this wallet");
    }
    LOCK(pwallet->cs_wallet);
    if (!pwallet->IsLocked()) {
        pwallet->TopUpKeyPool();
    }
    OutputType output_type = pwallet->m_default_change_type != OutputType::CHANGE_AUTO ? pwallet->m_default_change_type : pwallet->m_default_address_type;
    if (!request.params[0].isNull()) {
        if (!ParseOutputType(request.params[0].get_str(), output_type)) {
            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Unknown address type '%s'", request.params[0].get_str()));
        }
    }
    CReserveKey reservekey(pwallet);
    CPubKey vchPubKey;
    if (!reservekey.GetReservedKey(vchPubKey, true))
        throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
    reservekey.KeepKey();
    pwallet->LearnRelatedScripts(vchPubKey, output_type);
    CTxDestination dest = GetDestinationForKey(vchPubKey, output_type);
    return EncodeDestination(dest);
}
static UniValue setlabel(const JSONRPCRequest& request)