Vortex pinning in two-gap superconductors