Fighting along the frontier between Thailand and Cambodia has escalated, with both militaries accusing the other of firing first.