Better implementation of LinkedList.collect()

cf. 4fc8f75, da2dee5, ceylon/ceylon.language#492.