Design of hermetically metal-coated optical fibers to simultaneously minimize thermally and hydrostatic pressure induced stresses