Powerful Typhoon Melor has hit Japan's shores, with strong winds and waves damaging buildings and toppling trees.