Japanese prime minister cancels trip over major earthquake warning