Quantum spectral curve for ABJM theory