UN Secretary General Ban Ki-Moon has expressed shock after Hungarian police fired tear gas and water cannon at asylum seekers.