Metal-templated crystallization of germanium for optoelectronic applications