Manages a fixed pool of resources (e.g. buffers). Uses the fast try-lock operation to get a resource from the pool,
or returns a newly created resource. When the returned lock is unlocks, that resource becomes available again
Gets the next available resource for which the lock can be acquired and returns it and its associated
lock, which needs to be released when the caller is done using the resource. If no resource in the pool can be
locked, returns a newly created resource and a null lock. This means that no lock was acquired and thus
doesn't need to be released.
An Element with T and a lock (possibly null if newly created)