Tables as Texts or Images: Evaluating the Table Reasoning Ability of LLMs and MLLMs