Use lua-resty-lock to prevent race conditions when updating pool data
Add memory leak check target and fix tests
Add locking to API methods
Initial locking tests