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.
{
    if (request.fHelp || request.params.size() < 2 || request.params.size() > 3)
        throw std::runtime_error(
            "generatetoaddress nblocks address (maxtries)\n"
            "\nMine blocks immediately to a specified address (before the RPC call returns)\n"
            "\nArguments:\n"
            "1. nblocks      (numeric, required) How many blocks are generated immediately.\n"
            "2. address      (string, required) The address to send the newly generated bitcoin to.\n"
            "3. maxtries     (numeric, optional) How many iterations to try (default = 1000000).\n"
            "\nResult:\n"
            "[ blockhashes ]     (array) hashes of blocks generated\n"
            "\nExamples:\n"
            "\nGenerate 11 blocks to myaddress\n"
            + HelpExampleCli("generatetoaddress", "11 \"myaddress\"")
        );
    int nGenerate = request.params[0].get_int();
    uint64_t nMaxTries = 1000000;
    if (!request.params[2].isNull()) {
        nMaxTries = request.params[2].get_int();
    }
    CTxDestination destination = DecodeDestination(request.params[1].get_str());
    if (!IsValidDestination(destination)) {
        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Error: Invalid address");
    }
    std::shared_ptr<CReserveScript> coinbaseScript = std::make_shared<CReserveScript>();
    coinbaseScript->reserveScript = GetScriptForDestination(destination);
    return generateBlocks(coinbaseScript, nGenerate, nMaxTries, false);
}
static UniValue getmininginfo(const JSONRPCRequest& request)