F-regular and F-pure rings vs. log terminal and log canonical singularities