User analytics: make code more robust
User analytics: make code more robust

This commit introduces a Bout class to the useranalytics module. It keeps track
of all events within one bout. Based on this, the logic for creating bouts is
made simpler and more scalable.

This refers to issue #594 and issue #596.

fzadow/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,htem/CATMAID