[ticket/12171] Check topic visibility before allowing to download attachments

PHPBB3-12171
[ticket/12171] Split post and pm download links

PHPBB3-12171
PHPBB3-12172
[ticket/12171] Check post visibility before being able to download attachments

PHPBB3-12171