The metric dimension of Cayley digraphs