Afghan president inks power-sharing deal with rival