Collisional production of sterile neutrinos via secret interactions and cosmological implications