LaTeX writer: Use `\textquotesingle` for `'` in inline code.

Otherwise we get curly quotes in the PDF output.
Closes #1364.