[ticket/12535] Make <a> adjust to the image width

No HTML changes made.

Changed so that the `<a>` that surrounds the `<img>` in viewtopic does not use
all width and, instead, have the same size as the image.
Additionally, I added a CSS pseudo-element to make the required forced
line break after the `<img>` happen.

Only limited testing made. Please test before merging.

PHPBB3-12535