A powerful magnitude 8.1 earthquake has struck in the ocean off the coast of New Zealand, prompting evacuations and tsunami warnings across the South Pacific region.