QtHelp: Register documentation atomically
registerDocumentation() added the namespace, its folder, component,
version and filter attributes to the collection file before
registering the index tables in a transaction of their own. When the
index tables failed to register, the namespace stayed registered
without any index data, and registering it again failed because the
namespace already existed.
Wrap the whole registration in a transaction and check the result of
the commit.
Task-number: QTBUG-150686
Pick-to: 6.12 6.8
Change-Id: Ibdb4325f6cf8f8c4dd1fd2303da53e848919983e
Reviewed-by: Kai Köhne <kai.koehne@qt.io>