Coherent population trapping with a controlled dissipation: applications in optical metrology