Magnetic structure and critical behavior of GdRhIn5 : Resonant x-ray diffraction and renormalization group analysis