Updating cohorts.js

Adding loads of new features to the test object:

- User agent match
- Cookie match
- Referrer match
- URL match (for A/B URL redirects)
- DOM Ready function to ensure code runs as soon as all elements exist in the DOM
- Also made some cosmetic changes to the GA code