The inside story of the historic deal that created Australia's first national minority government in seven decades.