Weighted Inequalities for Fractional Integrals on Euclidean and Homogeneous Spaces