Thailand and Cambodia have halted fighting after weeks of clashes along their disputed border.