Make DocumentId and AnnotationId classes final

Identifier classes are made final because it does not make sense to inherit
anything from them. If a new Identifier class is needed, just create a new one.