Singapore's parliament has passed legislation that will see scammers, syndicate members and recruiters punished with up to 24 strokes of the cane.