Using a dedicated type allows to record in the type the guarantees that we
provide, such as scheme being HTTPS and authority being present. Allows to
replace ugly `fromJust` and such with direct field access.
This is a lot of code, better save now than sorry later when something
gets deleted by mistake.
Either way, the code will move later - once tested and organized
properly - into its own package.