Legendre Collocation Method for the Nonlinear Space–Time Fractional Partial Differential Equations