Add metrics worker class and symbolize keys test

Since the previous called apply_metric method will be used from every
metric I have created a dedicated metrics worker class to share common
functionality.

For regression tests I have also added a test for the symbolize keys
method which now belongs to the metrics worker class.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Restructure generic metric code in the worker

By moving code from the metrics controller to the metric worker I have
also refactored the code to make its semantic more clear.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add metric parent class to implement name method

Eventually, I found a reason to add a metric parent class. Instead of
hard coding the metric names like 'weighted-completeness', 'accuracy',
etc. into the classes they can be computed by a method — hence, the
parent class.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Fix some typos and bugs

Nothing really big, I just had to fix some typos, respectively bugs
which prevented the recently added code from working. I had to remove
the attribute reader as it was preventing the execution of the name
method.

I had to add a split method to the metric name method implementation as
the metric module is processed by the underscore method as well.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Process metric name for accessing repository score

There is a general convention clash for the metric names. As a general
name and for URL structuring I use hyphens, as opposed to underscores
which are used for instance variables and in the database.

The clash prevented the JavaScript code from accessing the repository's
metric scores. This commit fixes that.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add weighted completeness metric worker

I have added the weighted completeness metric worker which is more or
less the same code as the completeness metric code. I probably should
delegate some of the common code into the completeness metric only.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>
Add remaining metrics worker

Finally, I have the remaining metric worker implementation, namely the
worker for richness of information, accuracy and accessibility. In the
same course I have removed the old code from the metrics controller.

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