Australia's top corruption fighter is quitting his post after repeated questions about his ties to the military.