Invariant subspaces and exact solutions for some types of scalar and coupled time-space fractional diffusion equations