13327: More efficient implementation of the filterResources method
Firefox's built-in javascript profiler indicated that this one method
was accounted for something like 30% of the runtime to load a new page
of results. (i.e. if it took 1 second to go to the next page, this
accounted for 0.3s of that).
The previous implementation was in a functional programming style that
was egregiously inefficient, by using a reducer that made a copy of
the entire array for every item added to it.
Replaced with a basic imperative implementation that minimizes
redundant copies.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>