Using spinlock instead of a mutex in ObjectPool
Using spinlock instead of a mutex in ObjectPool

The ObjectPool is used in various places across BE and it was using the heavyweight
boost::mutex, which is prone to contention.
This patch substitutes this mutex with a spinlock, which has much less overhead.
Additionally, it moves the allocation of the container object out of the critical
section, which only needs to push that object to the shared vector of objects.

Change-Id: I50de17272de40278a445b62044d7f4e22f1c0956
Reviewed-on: http://gerrit.cloudera.org:8080/130
Reviewed-by: Ippokratis Pandis <49df5a81b84182d67af5e425b1c52ae595fc1f17@cloudera.com>
Tested-by: Internal Jenkins

michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala