Add support for UI unit testing

Adds a custom header that is checked on the dispatcher and enables
unit testing on the API. Part of #781
Committing test/ui directory with incomplete BadgeDaoTest.php file
Also, some changes to UnitTestHelper.
UnitTestHelper: Fix some SQL syntax errors which prevented inserts to oauth tables via the UnitTestHelper from working. Enabled exceptions for PDO so that problematic SQL in the UnitTestHelper will not fail silently.
test/ui/BadgeDaoTest: minor update, focusing on UserDaoTest and subsequently others for now as logic that will be in other Dao tests will be reused in BadgeDaoTest
test/ui/UserDaoTest: initial commit of file, some working tests but will need to revise some details within
UnitTestHelper: removed unnecessary logic that caused errors since PDO was forced to throw exceptions when needed
Middleware: fixed spelling mistakes
UserDaoTest: added more tests and made some PSR2 compliance changes
BadgeDaoTest: PSR2 compliance
made changes to the schema, added a procedure to get the TaskType string from the index. Many other changes releated to problems caused from previous name-spacing changes
Merge branch 'develop' of gitlab.trommons.org:solas-match into develop