Thailand plans joint arms factory with China