Make cache-recycling operations thread-safe.

When using DFS-query-then-fetch, some facet data-structures are acquired and
released on a different thread, which is something that is not supported by
the (soft) thread-local cache recycler.

On 1.x, this limitation has been removed, and all recyclers actually support
acquisitions and relases on different threads. This commit makes sure it also
works on 0.90 by making the stack that is used to store pending objects
synchronized. The performance impact of these synchronized blocks is expected
to be very low as there would be very little contention. By the way calls to
acquire/release are synchronized on the default cache recycler on 1.x.

Close #4754