Fix accidentally quadratic ident_map_multiple
Fix accidentally quadratic ident_map_multiple

Summary:
This implementation was added in D10525878.

Calling List.concat in a loop like this is O(n^2). This can lead to problems on
large statement lists. List.concat is also not tail recursive, so we pay the
cost of stack space as well.

Instead, we can accumulate a reversed list using rev_append, making the entire
fold O(n), while avoiding the stack cost as well.

Reviewed By: panagosg7

Differential Revision: D13569173

fbshipit-source-id: 91f436dc513854080daeee5acc8be43ea3517de7

nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow