Main: Reimplement media download

Add update of the <img> tag source attributes to point to local media storage
and construct the media list at the same time. The media are stored in separate
class.

Implement new functions, download_media() that does the media retrieval. Only
files that do not exist on disk yet are downloaded.
Main: Convert all links into whole URLs

The transformed text often contains links to other local pages. Since we are not
mirroring whole site, we just replace them with URL to the page on the internet.