contrib/upstart: Added ctrl/pid and conf to upstart

Allow override by a default file, and check if configuration file
is present.

Partial-Bug: LP #1330475
logthrdestdrv: mainloop refactoring was to be able to use the same infrastructure

for worker threads and io threads.

threadid allows LogQueueFifo to scale properly for input threads.
LogQueueFifo uses a fix size array for input threads, but threadid allocation
for threaded destination make this method wrong.

https://github.com/balabit/syslog-ng/issues/85

The solution is, that the worker threads get threadid from range 65-128,
and the input threads (ivykis worker threads) get id from range 1-64 as before.

Signed-off-by: Juhász Viktor <jviktor@balabit.hu>
Merge pull request #139 from sbadia/upstart/1330475

contrib/upstart: Added ctrl/pid and conf to upstart
Merge pull request #145 from juhaszviktor/threaded

logthrdestdrv: mainloop refactoring was to be able to use the same infra...