Prabowo Subianto, who is dogged by allegations of rights abuses, appears on course to win the presidency.