Measurement of inelastic, single- and double-diffraction cross sections in proton–proton collisions at the LHC with ALICE