Functional tests based on Casperjs

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