Prevent multiple instances of daemon

When started from configuration scripts like upstart, we can't
launch two instances, but when started from command line, multiple
thermald instance can run. This change prevents multiple instances.