Geometric finite element discretization of Maxwell equations in primal and dual spaces