Emergency rule 'ended' in Pakistan