Use GenericForeignKey for agenda related items, fix #865