Europe has retained the Ryder Cup, completing an improbable comeback from a 4-point deficit.