CS and documentation fixes

Updated docs to support IDE autocompletion and hinting. Re-ordered "use" statements, and removed unnecessary ones. Fixed some class references (e.g. "InvalidArgumentException" becomes "\InvalidArgumentException").
Remove unused args/code in UnitOfWork::doMerge()
Refactor if/else in DocumentRepository::find()
Throw exception if removed document encountered during flush

Fixes c8fafa99c7fb6733d604ee2378de477833e53e9a