Taiwan shares end slightly down ahead of U.S. inflation data