Phase transitions, dielectric, magnetic properties and valence of ions in AFe2/3W1/3O3±σ (A = Ba, Sr) multiferroic ceramics