Add hooks for user actions on "mode" switch

Implementation of https://bugs.launchpad.net/redshift/+bug/588087.

Usage:

Adding the following to `redshift.conf` will print
two texts saying what period of the day it is when
the transition barriers are reached as well as when
`redshift` starts.

```ini
[hooks]
day=echo day
day=echo it is day
twilight=echo twilight
twilight=echo it is twilight
night=echo night
night=echo it is night
```

When redshift calculates that it is night, when it as twilight
the last time this calculation was done it will run the `night`
hooks asynchroniously. In this example it is
`sh -c "echo night"` and `sh -c "echo it is night"`.