Core: Fix double-up of cache headers not respecting cachetime option, add attachment support to smtp simplemail