defined existin globals to avoid bug, when passed onto pages in the

experiment these vars not being declared

seperated code that updated forms into seperate functions

problem with experiment.js not submitting data with both passed on
cookie values and on page vars, updated

submitExperimentData()

to first buildExperimentData();
then updateTimeForm() and updateClickForm();
so forms are ready for sugmitting via ajax

put the cleanExperimentEnviroment() in a successful ajax response, we
can assume the experiment is finished when data is submitted so clean
the enviroment