core: fix buffer overflow in string formatting
core: set thread name using prctl after starting plugin thread
core: properly start first protocol instance after creation

If a new account was created for a previously unused protocol the instance
would not be started as the plugin hadn't been started. Solve this by using a
global flag to keep track on if instances should be started or not.