Hide attachments in history if user can't see them

If user is not allowed to view attachments (i.e. their access level is
lower than $g_view_attachments_threshold), then the history should not
display information about attachments.

Fixes http://www.mantisbt.org/bugs/view.php?id=17744
Is it worth caching the result of this check rather than doing it for every history event.  We also don't want to do it before the loop since we may not have attachments.