introduce docManager classe(refs #2785)

adapt test tu use getDocument instead of new_doc
rewrite new_doc
rewrite createDoc
use DocManager in main action and classes