Japanese court acquits longest-serving death row prisoner