Felipe Massa wins new Ferrari contract after return to form in Formula One