Adds TEST_ON_BORROW to OPTIONS to test connection on check out

This is False by default.  If enabled each time a connection is retrieved from the pool it is tested with TEST_ON_BORROW_QUERY, which defaults to 'SELECT 1'.

Reorganizes settings and connection pool creation into a couple of helper methods for clarity.
Basic test to simulate requests in a threaded environment
Tweaks to support Django 1.6dev