Refactoring and unit testing around the get_active_elections fn

- Move get active elections meth to election class
- Add unit test for method
- update requires so that tests run
- update dbobj base class to return instance in order to allow chaining
- update testbase class to return instances, not stdClass

Add requires for unit testing