core: Optimize vector-map, vector-for-each.