Permalink timestamps in the standalone pages and the stream page too

For the permalink generation the annotation id was necessary. However our viewer has stored this differently, so that the permalinks were not correct either in the standalone- nor in the stream page.
Now the directive checks for the annotationid property of the element and if it exists it uses the id from there.
Also the URI generation has bad for the standalone page. This has been also fixed.