Make Trails compatible with Piwik 1.10.1

Applied some changes and used the Controller by ao1977 (http://dev.piwik.org/trac/ticket/2596#comment:6) to make Trails compatible with the latest Piwik version.

fixes #3