What the president learned from a prosperity-gospel minister decades ago may help explain his attacks against the pope