Fix map & mapi

There were indexing issues that tests didn't catch for `mapi` (and there were no tests for `map`), so I fixed the bug and added tests.

Bug was e.g. 

```ocaml
map ~f:(fun x -> x + 1) [1;2;3]
(* => [1;3;4] *)
```

Because the first indexed element was being skipped.