Measurement of the branching fractions of the decays D + → K − K + K + , D + → π − π + K + and D s+ → π − K + K +