The structure of relatively hyperbolic groups in convex real projective geometry