Nepalese police have confirmed the nation's former prime minister has been detained in relation to his alleged negligence during widespread Gen Z protests.