Cavity ring down spectrocopy with a free-electron laser