Fixed tooltip and duration in agenda.

The tooltip did not show the end of an agenda item, but of the hole event.

If a item was closed, it was not used to calculate the end of the event.

Fixed #833
Use get_active_version in motion.__unicode__()

Fixes the bug, that motion.__unicode__() raises an AttributeError, if the active_version
was None.

Fixes #822
Merge pull request #830 from ostcar/issue-822

Use get_active_version in motion.__unicode__()
Merge pull request #836 from ostcar/issue-833

Fixed tooltip and duration in agenda.