Elliptic flow and energy loss of heavy quarks in ultrarelativistic heavy ion collisions