Variationally consistent computational homogenization of chemomechanical problems with stabilized weakly periodic boundary conditions. (13th August 2021)