Continue restructuring towards MVC pattern

New classes have been added to structure the application more towards
the MVC pattern. Especially, I have started to add classes to implement
the state pattern.

As planned I am starting now to move the client's REST API methods into
an enumeration called Protocol. Since, the handler mechanism in Android
works with integer values I have assigned each enumeration constant a
unique integer value. In addition, I have added a factory method to get
the enumeration constant by passing an integer value to it.

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

The first component linking has been implemented now. I have decided to
make this during the static initialization of the Client class. This
puts some more emphasis on the singleton style.

Android Lint warned me about using an anonymous class to extend the
Handler class. Hence, I have extracted that part into a new class. It
could have been a private inner class, but for reasons of overview I
prefer to put it into a separate file.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Implement state transition Idle -> Detecting

The first two methods which were removed from the Client class dealt
with the invocation request to start or stop the detection. In the idle
controller state class, both of these cases, the start and stop request,
are processed. For that reason the asynchronous task for the detection
request is now instantiated and executed in this controller state class
as well.

The whole onPostExecute method in DetectionRequest was refactored. I
removed all calls to the activity and replaced them with updates to the
model. In the end, the model will notify the observer and the interface
can then update the interface in a way that matches the model.

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