Fix typo of the GCM device registration identifier

While refactoring I forgot to rename one variable which lead to the
problem that the registration ID was always wrong.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add device registration action to the interface

There was a fundamental problem with detecting the state of the device
registration on the server and keeping this synchronized with the state
of the client.

Now I have added a separate action for the interface which issues a
device registration. Especially, I forgot to set the device registered
boolean back to false if this was the the case.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Persit Dropbox's request token key and secret

Every time the server is started the application needs to authorize the
usage of the Dropbox API. In order to avoid that tedious task the token
key and token secret is now stored into a file for later recovery.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Use multiprocessing for the Dropbox backups

The approach with uploading the file to the Dropbox storage directly
during the on modified event was flawed. The server became blocked and
could not respond anymore.

Hence, I have made use of Python's multiprocessing which can launch
multiple processes to outsource heavy tasks. Also this way the Global
Interpreter Lock is side-stepped.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add issue device registration to start detection

Instead of just setting the device registration state to false I change
the behaviour so that in case of a HTTP 503 (Conflict) on a detection
command a device registration will be issued as well.

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