Panama's next president wins with support from convicted ex-leader