add initialiser for common parts of the state

Signed-off-by: Mattias Andrée <maandree@operamail.com>
add gamma_set_option

Signed-off-by: Mattias Andrée <maandree@operamail.com>