Feature/email cids

General solution for CIDs.

Replacement happens just before the output. URLs are not interpolated unless we know a base url.
Comes with tests and doc