A search for resonant Z' production in high-mass dielectron final states with the ATLAS detector in Run-2 of the Large Hadron Collider