Time quasi-periodic gravity water waves in finite depth