Functional tests based on Casperjs

Tasks:

* [x] initialize the test infrastructure
* [ ] make sure it works on Travis