[task/namespaces] Update the code to use namespaces (untested)

This is initial work on making the code work with namespaces but isn't tested.
Note that tests will need to be reworked (see: https://github.com/phpbb-extensions/test-framework) so I sort of partially did them.
Merge pull request #71 from imkingdavid/task/namespaces

[task/namespaces] Update the code to use namespaces (untested)