Split up the font size calculation

The font size is a view concern, but the relative size belongs in the
model layer.
Fold two more SQL queries into the query object
Merge pull request #165 from kytrinyx/more-context-sql

Fold two more SQL queries into the query object
Merge pull request #164 from kytrinyx/adjust-font-size

Split up the font size calculation
use state machine from controller and handle exception
fix js for contexts and add i18n keys for closed contexts
remove two unused translation keys