Effective QED actions: Representations, gauge invariance, anomalies and mass expansions