The M31 globular cluster system: ugriz and K‐band photometry and structural parameters