The CKM matrix and flavor physics from lattice QCD