Japan ruling party candidate suffers by-election loss