Gauge Invariance of Sedeonic Equations for Massive and Massless Fields