Former cricketer Imran Khan has claimed victory in Pakistan's 2018 elections amidst violence and accusations of vote-rigging and military interference.