[TASK] Clean up DatabaseConnection class

* Reduce number of IDE warnings by fixing method annotations
* Minor nitpicks
* Remove "define visibility" TODOs for API methods

Change-Id: Ica0bf776d3f22678b6fb67cdd85da188011509b0
Reviewed-on: https://review.typo3.org/19522
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn