Optimal Bounds for Spanners and Tree Covers in Doubling Metrics