Minor improvements

1. Jdbc daos use DataSource instead of DriverManager
2. Api tests returned to test folder
3. Added null pointer check to jdbc daos