Add function to sanitize ConTeXt labels

Fixes #1581 

Adds a function `toLabel :: String -> String` to the ConTeXt writer, which sanitizes strings for use in reference labels, similar to the function of the same name in the LaTeX writer.