engine: Only connect if requested

Previously the page tried to connect to the engine every time it was
saved, this patch makes it depending on the state of the checkbox.
Also the logging is reconfigured after running the transaction, because
some imported script is messing with the logger.

Change-Id: I16ca421fda20d66713b3ffed54aafe2ddb0b7162
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>