Experimental demonstration of tripartite entanglement versus tripartite nonlocality in three-qubit Greenberger-Horne-Zeilinger–class states