Fix url prefix usage in experiments
This merge request fixes the URL generation in the emails sent when an experiment ends, successfully or not.
It also update the testing part and add tests for the email related functionnallity.
Part of #558 (closed)