Rewrite attachments directives and make them work as isolated components.
Remove obsolete jade partial related to attachments.