Afghanistan prison riot 'is over'