Senate confirms Loretta Lynch as attorney general