Transferring Knowledge Fragments for Learning Distance Metric from A Heterogeneous Domain