The k-metric dimension of a graph