Fixed #3326: Plugin pool initialises incorrectly if database is down during first request

This should fix #3326 by reporting job done (`discover_plugins`) after it's done, not before.