Add class template to topcoder boilerplating and adapt tests to be able to handle both method and class boilerplates

Topcoder solutions expect class base templates rather than method based ones. This pull request adds class based templates and the testing can now handle both class and method templates.