Three parties have agreed to form a centrist coalition in Austria, locking a far-right party out of government five months after it won an election.