Centroid‐density quantum rate theory: Variational optimization of the dividing surface