Heidfeld and Renault reach agreement