implemented status sql repo

- clean up of connection management
- added pagination service and tests