Extract attachments view: Fixed contenttype helper when lookup via filename.

Backport of #682 to `4.0-stable` branch for `4.0.5` release

The `content_type_helper` used for displaying the according icon in the `type`
column of the attachments table, has a fallback for attachments with
`application/octet-stream` as contenttype.

But this fallback has not work correctly, because the `globFilename` method
always returns the mimetype itself.

(cherry picked from commit d88c48f823281287be5de20b3987d91b065596c8)

Conflicts:
	docs/HISTORY.txt