QED from six-dimensional vortex and gauge anomalies