Fix unlock interface consistency

I am still not very happy with the whole locking and unlocking of the
interface. If there is one unlocking missing, the interface will look
like it hangs in infinite loading.

I have added some unlock interface calls where I forgot them. Also added
a null reference check for restoring the snapshot image.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Replace internal HTTP messaging with inotify

The whole motion alert and snapshot retrieval worked with additional
Python scripts which sent requests to the web server which then would
act upon the requests and inform the client.

This implementation produced a huge overhead. For that reason I am now
using Watchdog which makes use of inotify. inotify is Linux kernel
subsystem that acts to extend the filesystems to notice changes to the
filesystem, and report those changes to applications. Watchdog is one of
many Python wrappers for that.

In addition I have moved the GCM messaging into a separate class,
respectively into another file. A snapshot event handler is registered
with the Watchdog observer for taking the appropriate actions.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>