Former president of Pakistan General Pervez Musharraf, who backed the US-led invasion of neighbouring Afghanistan during his tenure, has died after a prolonged illness at the age of 79.