Structural, electrical, and vibrational properties of Ti-H and Ni-H complexes in Si