### Apache Airflow version

2.1.3 (latest released)

### Operating System

macOS Big Sur 11.3.1

### Versions of Apache Airflow Providers

n/a

### Deployment

Astronomer

### Deployment details

default Astronomer deployment with some test DAGs

### What happened

In the UI for DAGRuns there are checkboxes that allow multiple DAGRuns to be selected.

![image](https://user-images.githubusercontent.com/89415310/133841290-94cda771-9bb3-4677-8530-8c2861525719.png)

Within the Actions menu on this same view, there is a Delete option which allows multiple DAGRuns to be deleted at the same time.

![image](https://user-images.githubusercontent.com/89415310/133841362-3c7fc81d-a823-4f41-8b1d-64be425810ce.png)

Task instance view on the UI does not offer the same option, even though Task Instances can be individually deleted with the trash can button.

![image](https://user-images.githubusercontent.com/89415310/133841442-3fee0930-a6bb-4035-b172-1d10b85f3bf6.png)


### What you expected to happen

I expect that the Task Instances can also be bulk deleted, in the same way that DAGRuns can be.

### How to reproduce

Open up Task Instance and DAGRun views from the Browse tab and compare the options in the Actions dropdown menus.

### Anything else

_No response_

### Are you willing to submit PR?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

airflow/www/views.py
"""
    Create the list of edges needed to construct the Graph view.
    A special case is made if a TaskGroup is immediately upstream/downstream of another
    TaskGroup or task. Two dummy nodes named upstream_join_id and downstream_join_id are
    created for the TaskGroup. Instead of drawing an edge onto every task in the TaskGroup,
    all edges are directed onto the dummy nodes. This is to cut down the number of edges on
    the graph.
    For example: A DAG with TaskGroups group1 and group2:
        group1: task1, task2, task3
        group2: task4, task5, task6
    group2 is downstream of group1:
        group1 >> group2
    Edges to add (This avoids having to create edges between every task in group1 and group2):
        task1 >> downstream_join_id
        task2 >> downstream_join_id
        task3 >> downstream_join_id
        downstream_join_id >> upstream_join_id
        upstream_join_id >> task4
        upstream_join_id >> task5
        upstream_join_id >> task6
    """
    
    edges_to_add = set()
    
    edges_to_skip = set()
    task_group_map = dag.task_group.get_task_group_dict()
    def collect_edges(task_group):