Iceland's Prime Minister Sigmundur David Gunnlaugsson has resigned, his party said, the first major political casualty to emerge from the leak of the so-called Panama Papers financial documents.