Fix DBCP-376
Fix thread safety issues in the SharedPoolDataSource and the PerUserPoolDataSource.
Test case and fix based on patches suggested by Dave Oxley.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/dbcp/branches/DBCP_1_5_x_BRANCH@1562842 13f79535-47bb-0310-9956-ffa450edef68