Format Python code for PEP 8 compliance

PEP 8 is a style guide for Python code. By using Flake8 I have checked
the whole code of the notifier Python script. The file is now PEP 8
compliant.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Refactor web server to improve quality

The current structure of the web application to control the motion
detection is very poor. The micro web framework Bottle seems the right
approach to restructure the server application. Bottle makes use of
function decorators.

Tornado will be dropped as a web server. For now I have created a new
Python file where I have defined the required REST commands so far.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Complete implementation for basic requests

So far I have implemented now every request. I have also added a clean
version of the motion configuration file. A local file is required,
otherwise this application will not work properly.

What is new is that the motion control port is now read from the motion
configuration file itself allowing the user to change the control port
without touching more than one file.

The model is one class encapsulating all the functionality which is
accessed by the Bottle route functions.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Check for authorization in each request

There should be no request to the server which is not authorized. I have
added a function decorator to perform the authentication. The
credentials are given by a settings file. The decorator was added to
each request.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Check for authorization in each request

There should be no request to the server which is not authorized. Thus,
I have added a function decorator to perform the authentication. The
credentials are given by a settings file. The decorator was added to
each request.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add GET request for status

When the Android application is newly started it has to check whether
the server backend has the motion process running in order to display
the proper state. This request can also be used to check the
connectivity.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Refactor setting parsing into utility module

There will be more Python scripts than the server itself. Hence, I have
refactored the setting parsing into a utility module. For that I am
using the securitas package where the old implementation still resides.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Improve coupling between the server and Motion

There are still problems which prevent a seamless interoperability
between Motion and the server backend. I have created a script which is
used to issue a motion alert to the server: motion_alert.py The script
is invoked by Motion.

I have created another script, snapshot_notification.py, which is used
to tell the server backend that a new snapshot has been created. This
needs to be done because from snapshot request to the actual file
creation it takes a moment or two. This synchronization problem is
solved with an Event.

The Bottle server is now backed by paste in order to be executed
multi-threaded. When the Motion process is started the camera needs a
short warm-up phase to produce pictures with sufficient lighting. Thus,
I have added a short sleep timer.

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

The previous Android frontend implementation was a throwaway-prototype.
The new application was build from scratch and aims for a more
interactive and secure usage. Heavy use of asynchronous tasks and the
Android standard library was made.

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