After legal battle, $50 million bequest for Panama's poor goes instead to wealthy dynasty.