BUG: rows containing missing values are being ignored by pivot_table
- [x] I have checked that this issue has not already been reported.


- [x] I have confirmed this bug exists on the latest version of pandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---

#### Code Sample

```python
import pandas as pd
import numpy as np

df = pd.DataFrame({'A': ['a', np.nan, 'a', 'a'], 'B': ['b', 'b', np.nan, 'b'], 'X': [5, 10, 15, 20]})
     A    B   X
0    a    b   5
1  NaN    b  10
2    a  NaN  15
3    a    b  20

pd.pivot_table(df, index=['A', 'B'], values=['X'], aggfunc=np.sum)
   A  B   X
0  a  b  25

```

#### Problem description

Certain rows are being ignored during aggregation by pivot_table method when the data contains any missing values in index columns.


#### Expected Output

```python
pd.pivot_table(df, index=['A', 'B'], values=['X'], aggfunc=np.sum)
     A    B   X
0    a    b  25
1  NaN    b  10
2    a  NaN  15

```

#### Output of ``pd.show_versions()``

<details>

INSTALLED VERSIONS
------------------
commit           : 2cb96529396d93b46abab7bbc73a208e708c642e
python           : 3.9.4.final.0
python-bits      : 64
OS               : Windows
OS-release       : 10
Version          : 10.0.19041
machine          : AMD64
processor        : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
byteorder        : little
LC_ALL           : None
LANG             : None
LOCALE           : English_United States.1252
pandas           : 1.2.4
numpy            : 1.20.2
pytz             : 2021.1
dateutil         : 2.8.1
pip              : 21.1
setuptools       : 56.0.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : None
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.11.3
IPython          : 7.22.0
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : 3.4.1
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pyxlsb           : None
s3fs             : None
scipy            : 1.6.2
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
numba            : None

</details>
