A nautical one-liner has been named the funniest gag at the Fringe after being chosen from a shortlist by members of the public.