The project marks a big bet on Malaysia, which is emerging as a global center for testing and assembling semiconductors.