The metric dimension of unicyclic graphs