Leinster held on and survived a late scare to reach this season's Champions Cup final by beating Toulon 29-25 at the Aviva Stadium in Dublin.