Properly synchronize NetconfDeviceTopologyAdapter
The adapter is using TransactionChain, which should always be guarded.
Make sure we guard that even when callers fail to provide their own
guards.
There is a further bug, where a failed last transaction would not
complete the closeFuture(), leaving callers stack.
Finally we disconnect from AutoCloseable and provide a shutdown()
method, which allows users to decide on how to synchronize the datastore
access. This allows us to concurrently shutdown the mount point and
datastore state and wait for the completion of the latter only after
both actions have been initiated.
JIRA: NETCONF-1146
Change-Id: Ieeb6ca485bed3553224f6845d04ae07d4c5d5176
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>