A tsunami warning has been lifted for Tonga after a strong 7.1 magnitude earthquake struck near the Pacific Island country.