An Information-Theoretic Analysis for Transfer Learning: Error Bounds and Applications