Ashley Giles has taken over as England One-day and T20 head coach, with Andy Flower remaining as team director.