Connecting measures by means of branched transportation networks at finite cost