deluge: Installation fails sometimes on slow machine

Error happens when the core configuration file of the deluged service is not generated, for example #1776 (closed).

Deluged service on Debian Stable creates the core configuration file after first exit. The version on Debian Testing creates the configuration file during first run.

Find a way to detect that the deluged and deluge-web services are fully initialized after first run. Or increase the wait time (currently 10s) before shutting down services which reduces the probabilty of the failure.