Move translation context into a struct

Translation context such as the next char is upper case or whether we
are inside an all upper case word, etc is currently stored in a number
of global variables. This complicates the API of many of the
functions.

This PR moves these state variables into a struct and consequently
only has to pass this struct around to the functions which simplifies
the calling API of said functions quite a bit.
1 file changed