Analytical normalization of resonant states in photonic crystal slabs and periodic arrays of nanoantennas at oblique incidence