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.
{
    std::string label = value.get_str();
    if (label == "*")
        throw JSONRPCError(RPC_WALLET_INVALID_LABEL_NAME, "Invalid label name");
    return label;
}
static UniValue getnewaddress(const JSONRPCRequest& request)
{
    std::shared_ptr<CWallet> const wallet = GetWalletForJSONRPCRequest(request);
    CWallet* const pwallet = wallet.get();
    if (!EnsureWalletIsAvailable(pwallet, request.fHelp)) {
        return NullUniValue;
    }
    if (request.fHelp || request.params.size() > 2)
        throw std::runtime_error(
            "getnewaddress ( \"label\" \"address_type\" )\n"
            "\nReturns a new Bitcoin address for receiving payments.\n"
            "If 'label' is specified, it is added to the address book \n"
            "so payments received with the address will be associated with 'label'.\n"
            "\nArguments:\n"
            "1. \"label\"          (string, optional) The label name for the address to be linked to. If not provided, the default label \"\" is used. It can also be set to the empty string \"\" to represent the default label. The label does not need to exist, it will be created if there is no label by the given name.\n"
            "2. \"address_type\"   (string, optional) The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\". Default is set by -addresstype.\n"
            "\nResult:\n"
            "\"address\"    (string) The new bitcoin address\n"
            "\nExamples:\n"
            + HelpExampleCli("getnewaddress", "")