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/trunk@1562825 13f79535-47bb-0310-9956-ffa450edef68