The result marks an end to Frank Bainimarama’s nearly 16-year rule of the Pacific Island nation.