Improve reusability

Implement changes based on given feedback:

- [x] Reorganize code structure
- [x] Add classes for request/response handling
- [x] Make output format rendering extensible
- [x] Extract persistence into a model

Notes:
* I didn't extract the template rendering into an external class because I am using `Goliath::Rack::Templates` and it's meant to be used within the context of the application (I had some issues finding paths when extracting it out into a module since it uses `Goliath::Application.root_path('views')`, which internally uses `File.expand_path("./")` and takes the path of the module instead of the path of the application itself).